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
compilation
:
Content language: English
Русский
Given the class: public class Clazz { public static void main(String[] args) { // input here } } which of the following definitions can be added to it so that it successfully compiles?
compilation
What will be printed out as a result of the following code compilation and execution? public class Quest { public static void main() { System.out.print("A"); } public static void main(String args) { System.out.print("B"); } public static void main(String[] args) { System.out.print("C"); } }
compilation
Which line/lines contain an error? int i = 1; //1 i = -+(10 + 2 + i); //2 ++i--; //3 System.out.println(i);
compilation
What will the following code print? public class A { int a; //--1-- public short getB() { short b; //--2-- return b; //--3-- } public static void main(String[] args) { System.out.print(new A().a); // --4-- System.out.println(new A().getB()); } }
compilation
What happens as a result of attempts to compile and run the program? class Quizful { public static void main(String[] args) { String a = "\u000a"; String d = "\u000d"; System.out.print(a + " " + d); } }
compilation
What happens as a result of compiling and running the following code: public class Bar extends Foo { // 1 public static void main(String[] args) { // 2 System.out.print(sum(1, 2)); // 3 } } class Foo { int sum(int x, int y) { return x + y; } }
compilation
Which of the following statements in the given code are true? class A { A(int i) {} } // 1 class B extends A {} // 2
compilation
Is an empty file allowed to compile?
compilation
What will be the result of compiling and running the following code? import static java.lang.Byte.*; import static java.lang.Integer.*; public class Test { public static void main(String[] args) { System.out.println(MAX_VALUE); } }
compilation
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);
compilation
← Prev
1
2
3
4
5
Next →
Sign Up Now
or
Subscribe for future quizzes