Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
Integer
:
Content language: English
Русский
What will be the output of the following code? Integer foo = 1000; Integer bar = 1000; System.out.println(foo <= bar); System.out.println(foo >= bar); System.out.println(foo == bar);
Integer
What will be written to the console by the following code: 01: public class Clazz { 02: public static void main(String[] args) { 03: Integer integer = new Integer(1024); 04: Long aLong = new Long(1024); 05: if (integer.equals(aLong)) 06: System.out.println("eq"); 07: if (integer.intValue() == aLong.longValue()) 08: System.out.println("=="); 09: } 10: }
Integer
What will be the output of the following code? public class IntTest { public static void main(String[] args) { Integer i1 = 1; Integer i2 = new Integer(1); Integer i3 = Integer.valueOf(1); System.out.println((i1 == i2) + " " + (i1 == i3) ); } }
Integer
What will be the value of y after executing the following statements: int x = Integer.MIN_VALUE; int y = -x;
Integer
What will be the result of compilation and execution of the following code: public class Test { public static void main(String[] s){ long c = 1; switch(c) { case 1: c = 3; break; case 3: c = 4; break; } System.out.println(c); } }
Integer
Consider following code: $var = 1 + "-1.3e3"; echo $var; What will be the result of the code above?
integer
← Prev
1
2
Next →
Sign Up Now
or
Subscribe for future quizzes