What is the purpose of static methods and static variables?
No Answer is Posted For this Question
Be the First to Post Answer
How can we run a java program without making any object?
What is the size of an array?
Can a static class have a constructor?
What is preparedstatement in java?
What is the difference between access specifiers and access modifiers in java?
How do you read and print a string in java?
10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }
Can we change the scope of the overridden method in the subclass?
What is a parameter example?
When should we create our own custom exception classes?
11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println(”B”); } 16. } 17. public static void main(String[] args) { 18. new B().process(); 19. } What is the result? 1 B 2 The code runs with no output. 3 Compilation fails because of an error in line 12. 4 Compilation fails because of an error in line 15.
What is class??