Question: Which is not a correct variable declaration and value assignment in Java? A. int x = 14; B. double d = 3.147; C. float f

Which is not a correct variable declaration and value assignment in Java?

A. int x = 14;

B. double d = 3.147;

C. float f = 3.147;

D. char c = 'R';

E. boolean b = false;

Which is probably the output of the following statement?

System.out.println(0.7 + 0.1);

A. 0.8 B. .8 C. 0.7 + 0.1 D. 0.7999999999999999 E. An error message

Which statement will cause an syntax error? A. char c = 'Q'; B. String s = "apple"; C. char c = ' '; D. String s = " "; E. char c = "K";

The output of the following statement is __. System.out.println(4 <= 7); A. false B. 0 C. true D. 1 E. null

Given the following code, the output is __. String str1 = new String("apple"); String str2 = new String("apple"); System.out.print(str1 == str2); A. false B. 0 C. true D. 1 E. null

Given the following code, the output is __. String str1 = "apple"; String str2 = "apple"; System.out.println(str1 == str2);

A. false B. 0 C. true D. 1 E. null

Which defines a constant of double type in Java? A. public double d = 0.32685; B. private double d = 0.32685; C. static double d = 0.32685; D. final double d = 0.32685; E. const double d = 0.32685;

Given the following code, how many lines will the output have? System.out.print("An apple a day, keeps doctors away ."); A. 1 B. 2 C. 3 D. 4 E. 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!