小编chi*_*ief的帖子

字符串无法解析为某个类型

我的代码中出现"字符串无法解析为类型"错误.

public class Main {


 public static void main(String[] args) {
  // TODO Auto-generated method stub
  FormLetter template;
  template = new FormLetter();
  template.print();
  template.composeFormLetter(Sean, Colbert, God);
  template.print();

 }

}

class FormLetter
 {
  public void print(){
    System.out.println(to + candidate + from);

  }  

  public void composeFormLetter(string t, string c, string f){

   to = t;
   candidate = c; 
   from = f;
  } 
   private string to;
   private string candidate;
   private string from;

  }
Run Code Online (Sandbox Code Playgroud)

java

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

java ×1