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
Русский
Is it possible to use abstract and final modifiers during a class declaration at the same time?
compilation
What will happen after the following code is compiled and executed? abstract public class Parent { String s = "hello!"; public void test() { System.out.println(s); } } class P { public static void main(String[] args) { Parent p = new Parent(); p.test(); } }
compilation
Which of the following lines will compile without errors and warnings?
compilation
Select correct variable declarations.
compilation
Given the following class: public class Main { public static void main(String[] args) { // TODO code application logic here } } Specify the full name of the package that was automatically imported.
compilation
Which of these lines contains a valid code: public class Test { public static void main(String[] sr) { int x, y, z; x = 1; y = 2; z = 3; System.out.println(z >= y >= x); //1 System.out.println(z >= y && y >= x); //2 } }
compilation
What will be the result of the following code compilation and execution? class Quizful { private int xp = 0; static void add(Quizful q, int value) { q.xp = q.xp + value; } static void multiply(int xp, int value) { xp = xp * value; } public static void main(String[] args) { Quizful q = new Quizful(); add(q, 2); multiply(xp, 3); System.out.print(q.xp); } }
compilation
What will happen after the code is compiled and program is run without arguments? public class Main { public static void main(String[] args) { System.out.println(args.length); } }
compilation
What is the result of the following code execution? abstract class Test{ private static int getHalf(int i){ return i/2; } public static void main(String[] str){ int half=getHalf(0); System.out.println("Result is:"+half); } }
compilation
What will be the result of the following code compilation and execution? public class Test { public static void main(String[] args) { byte a = 3; short b = 4; compute(a, b); } public static void compute(short x, short y) { System.out.println("Short: " + (x + y) + (x + y)); } }
compilation
← Prev
1
2
3
4
5
Next →
Sign Up Now
or
Subscribe for future quizzes