aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
Multiple choice technology web technology

class C { public static void main(String[] args) { double d1 = Math.floor(0.5); double d2 = Math.floor(1.5); System.out.print(d1 + "," + d2); }}

  1. will print "Strin"

  2. will print "Stri"

  3. will cause compiler error

  4. none of the above

Reveal answer Fill a bubble to check yourself
B Correct answer

Keep practicing — related questions

  • class PrintTest{ public static void main(String[] args) { double d=222.4578; System.out.printf(“% .2f”,d); } }
  • class PrintTest{ public static void main(String[] args) { double d=222.4578; System.out.printf(“% .2f”,d); } }
  • public class Question { public static void main(String args[]) { int x=y=10; y=12; System.out.print(x+"&"+y...
  • public class Question { public static void main(String args[]) { int x=y=10; y=12; System.out.print(x+"&"+y...
  • public class Question { public static void main(String args[]) { int x=y=10; y=12; System.out.print(x+"&"+y...
  • class D { public static void main (String args[]) { Byte a = new Byte("1"); byte b = a.byteValue(); short c...
  • public class Question { public static void main(String args[]) { int x=0x10; System.out.print("X="+x); } }
  • public class Question { public static void main(String args[]) { int x=0x10; System.out.print("X="+x); } }

Practice this topic

  • Programming Output Evaluation (1721 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy