Solving various questions on output of java code


Questions:

Solving various questions on output of Java code

What is the output of this code sequence?

Double a = 12.5;

System.out.println (a);

What is the output of this code sequence?

Float a = 13f;

System.out.println (a);

What is the output of this code sequence?

Int a = 13 /5;

System.out.println (a);

What is the output of this code sequence?

Int a = 12 / 6 *2;

System.out.println (a);

What is the output of this code sequence?

Int a =4 + 6 /2;

System.out.println (a);

What is the output of this code sequence?

Double a = 12.0 /5;

System.out.println (a);

What is the output of this code sequence?

Double a = (double) (12) /5;

System.out.println (a);

What is the output of this code sequence?

Int a=5;
A++;
System.out.println (a);

What is the output of this code sequence?

Int a =5

System.out.println (--a);

What is the output of this code sequence?

Int a=5;

A /= 6;

System.out.println (a);

Write the pseudocode for a program that finds the product of two numbers.

Write the pseudocode for a program that finds the sums of the numbers input that are greater than or equal to 10 and the numbers input that are less than 10.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Solving various questions on output of java code
Reference No:- TGS01938039

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)