تفاصيل الدورة
This course is for anyone who wants to test or brush up their core Java skills or face java interviews.
Java is the most popular language world wide and technologies like Servlets & JSP, J2EE, Struts, Spring, Hibernate, JMS or android for mobile applications are all based on core Java.
Quizzes cover following topics:-
- Java syntax and grammar
- Javadoc and developer comments and their significance.
- Variables, Data Types and Operators
- Control Statements: if-else, switch-case and loops
- Java arrays and Command-line arguments
- Packages, classpath and User-input using Scanner
- Classes, objects, constructors, initialization blocks, type of variables, methods and Garbage collection
- Object Oriented Programming Concepts:
- Encapsulation
- Inheritance
- Polymorphism
- Abstraction
- Access specifier, instanceof operator and casting
- String, StringBuilder and Wrapper classes
- Exception
- Enumeration
Q1: What will be the result of compiling and executing following program?
//Test1.javaclass Vehicle { public int getRegistrationNumber() { return 1; }}class Car { public int getRegistrationNumber() { return 2; }}public class Test1 { public static void main(String[] args) { Vehicle obj = new Car(); System.out.println(obj.getRegistrationNumber()); }}
A. 1
B. 2
C. An exception is thrown at runtime.
D. Compilation error.
Answer: D
Q2: Below is the code of Test06.java file.
What will be the result of compiling and executing following program by using the command java Test06 RED AMBER
public class Test06 { enum TrafficLight { RED, YELLOW, GREEN; } public static void main(String[] args) { TrafficLight tl = TrafficLight.valueOf(args[1]); switch(tl) { case TrafficLight.RED: System.out.println("STOP"); break; case TrafficLight.YELLOW: System.out.println("SLOW"); break; case TrafficLight.GREEN: System.out.println("GO"); break; } }}
A. STOP
B. No output
C. IllegalArgumentException is thrown
D. None of the above
Answer: D
Q3: What will be the result of compiling and executing following program?
public class Test5 { public static void m1() { System.out.println("static method."); } public static void main(String[] args) { Test5 obj = null; obj.m1(); }}
A. NullPointerException is thrown.
B. Compilation error.
C. static method.
D. None of the above.
Answer: C
- JavaScript Full stack web developer virtual internship Virtual Bootcamp + Internship at Laimoonدرهم 1,449مدة الدورة التدريبية: Upto 30 Hours
- 10 USD
250 USDمدة الدورة التدريبية: Upto 14 Hours - Camtasia Studio – Beginner Study 36524 USDمدة الدورة التدريبية: 3 Hours