假设有String a="A";char b='A'; char c=65,下面选项中正确的是( )。
A: if(a== {Systeouprint("Equal")}
B: if(c== {Systeouprint("Equal")}
C: if(a== {Systeouprint("Equal")}
D: if(c== {Systeouprint("Equal")}
A: if(a== {Systeouprint("Equal")}
B: if(c== {Systeouprint("Equal")}
C: if(a== {Systeouprint("Equal")}
D: if(c== {Systeouprint("Equal")}
举一反三
- 假设有String a="A";char b='A'; char c=65,下面选项中正确的是( )。 A: if(a==b) System.out.print("Equal") B: if(c==b) System.out.print("Equal") C: if(a==c) System.out.print("Equal") D: if(c==b) System.out.print("Equal")
- 调用以下类D和E的main() 方法的输出结果为?class D { public static void main(String[] args) { String s1 = new String("hello"); String s2 = new String("hello"); if (s1.equals(s2)) System.out.println("equal"); else System.out.println("not equal"); }} class E { public static void main(String[] args) { StringBuffer sb1 = new StringBuffer("hello"); StringBuffer sb2 = new StringBuffer("hello"); if (sb1.equals(sb2)) System.out.println("equal"); else System.out.println("not equal"); }} A: D: equal; E: equal B: D: not equal; E: not equal C: D: equal; E: not equal D: D: not equal; E: equal
- each series section of a series pipeline A: head loss equal B: total energy loss equal C: hydraulic gradient equal D: flow rate equal
- 下面代码的输出结果是()。 A: 2 B: 2.0 C: (x==y): D: int("Equal") E: se: F: int("Not Equal") G: Equal H: Not Equal I: 编译错误 J: 运行时错误
- ___, I would buy the red coat not the green one. A: To be equal to other things B: Other things being equal C: Other things to be equal D: Were other things to be equal