Pessoal,
Como vcs respondem a esses tipos de perguntas:
class MCZ15 {
public static void main (String[] args) {
float a = 1.1e1f; // 1
float b = 1e-1F; // 2
float c = .1e1f; // 3
double d = .1d; // 4
double e = 1D; // 5
}}
A compile-time error is generated at which line?
a. 1
b. 2
c. 3
d. 4
e. 5
f. None of the above
class MCZ16 {
public static void main (String[] args) {
float a = 1; // 1
float b = 1L; // 2
float c = 1F; // 3
float d = 1.0; // 4
}}
A compile-time error is generated at which line?
a. 1
b. 2
c. 3
d. 4
e. None of the above
class MCZ18 {
public static void main (String[] args) {
String a = "abcd"; // 1
String b = "'\u0041'"; // 2
String c = "\u0041"; // 3
String d = "\uD7AF"; // 4
System.out.print(a+b+c+d); // 5
}}
A compile-time error is generated at which line?
a. 1
b. 2
c. 3
d. 4
e. 5
f. None of the above
class MCZ25 {
public static void main (String[] args) {
char a = '\7'; // 1
char b = '\61'; // 2
char c = '\062'; // 3
char d = '\x7'; // 4
char e = '\x41'; // 5
System.out.print(""+a+b+c+d+e);
}}