Programming Language Operator in Java Question #2131
Single Choice Not Set

QWhat will be the output?
public class Test{
      public static void main(String args[]){
            int a = 42;
            double b = 42.25;
            System.out.print((a%10)+" "+(b%10));
      }
}

ID: #2131 Operator in Java 761 views
Question Info
#2131Q ID
Not SetDifficulty
Operator in JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 42 42.5
  • B 2 2.5
  • C 4.2 4.225
  • D 2 4.225
Correct Answer

Explanation

2 2.5

Share This Question

Challenge a friend or share with your study group.