我javac编译这段代码
public class test2
{
public static void main(String[] args)
{
String a="333";
String sexofyou="boy";
double heightofyou=1.83;
if(sexofyou=="boy" && heightofyou>1.83)
{
System.out.println("请你加入篮球队");
}
}
}
javac后显示第七行非法字符:\65037
double heightofyou=1.83;
和第十行非法字符非法字符:\65037
System.out.println("请你加入篮球队");
请问这到底是怎么回事
public class test2
{
public static void main(String[] args)
{
String a="333";
String sexofyou="boy";
double heightofyou=1.83;
if(sexofyou=="boy" && heightofyou>1.83)
{
System.out.println("请你加入篮球队");
}
}
}
javac后显示第七行非法字符:\65037
double heightofyou=1.83;
和第十行非法字符非法字符:\65037
System.out.println("请你加入篮球队");
请问这到底是怎么回事
String sexofyou="boy";
double heightofyou=1.83;
if(sexofyou=="boy" && heightofyou>1.83)
{
System.out.println("请你加入篮球队");
的条件为假,怎么可能执行
System.out.println("请你加入篮球队");