πŸ“Š JAVA
Q. What will be the output of following java code?
Code:
public class Test{
      public static void main(String args[]){
            int a = 42;
            double b = 42.25;
            System.out.print((a%10)+" "+(b%10));
      }
}
  • (A) 42 42.5
  • (B) 2 2.5
  • (C) 4.2 4.225
  • (D) 2 4.225
πŸ’¬ Discuss
βœ… Correct Answer: (B) 2 2.5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
202
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Shivam
Publisher
πŸ“ˆ
80%
Success Rate