Purchase Solution

Solving various questions on output of Java code

Not what you're looking for?

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 Summary

The solution gives complete solutions for various questions on output of Java code. Each question is discussed in details.

Solution Preview

What is the output of this code sequence?
Double a = 12.5;
System.out.println (a);
ans: 12.5 as a is of a double type.

What is the output of this code sequence?
Float a = 13f;
System.out.println (a);
ans: 13.0 as a is of a float type.

What is the output of this code sequence?
Int a = 13 /5;
System.out.println (a);
ans: 2 as only integer part is printed

What is the output of this code sequence?
Int a = 12 / 6 *2;
System.out.println (a);
ans: 4 as divison is processed first.

What is ...

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Javscript Basics

Quiz on basics of javascript programming language.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.