You are not logged in.

#1 2015-06-13 04:13:39

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

Public Class Test:

Java Quizzes Java Language Operators

Directions:
public class Test{
      public static void main(String args[]){
            int a = 42;
            double b = 42.25;
            System.out.print((a%10)+" "+(b%10));
      }
}

Question:
What will be the output?

Option A):
2 2.5
Option B):
42 42.5
Option C):
4.2 4.225
Option D):
2 4.225

Correct Answer is Option A):
2 2.5


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-06-13 04:13:39

Advertisement
Ads By Google

Re: Public Class Test:



\n

Board footer