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
keywords
:
Content language: English
Русский
Is it possible to use abstract and final modifiers during a class declaration at the same time?
keywords
What will happen as the result of the following code compilation? 1. package mail; 2. 3. interface Box { 4. protected void open(); 5. void close(); 6. public void empty(); 7. }
keywords
Select all modifiers that are applicable to top-level classes (not nested).
keywords
Which line will the first compilation error occur in? public class Test { /* 1 */ public final static class A {} /* 2 */ static private class B {} /* 3 */ abstract static class C {} /* 4 */ static final private class D {} /* 5 */ final public abstract class E {} /* 6 */ static final abstract class F {} }
keywords
Select modifiers applicable to class fields:
keywords
What will be the result of the following program execution? public class Program { public static void main(String[] args) { int N = 5; int m[] = new int[N]; label: for (int i = 0; i < N; ++i) { m[i] = i * i; if (m[i] == 9) { System.out.print("9 "); goto label; } } } }
keywords
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?
keywords
Is the absence of a package declaration in the source code acceptable?
keywords
How should the line 6 of the following code be modified so that the compilation error does not occur (select all that apply)? 1: class Class1 2: { 3: int total = 0; 4: public static void main( String[] args ) 5: { 6: doIt(); 7: } 8: void doIt() 9: { 10: for ( int i = 0; i < 5; i++ ) total += i; 11: System.out.println( total ); 12: } 13: }
keywords
Which of the following variable declarations are allowed in Java?
keywords
← Prev
1
2
Next →
Sign Up Now
or
Subscribe for future quizzes