JAVA QUIZ 2 29 Created on May 07, 2020 By Sirjana GhimireAcharya JAVA QUIZ 2 1 / 10 What is a correct syntax to output "Hello World" in java? echo("Hello World"); System.out.println("Hello World"); print("Hello World"); Console.WriteLine("Hello World"); 2 / 10 2. What is the correct syntax for java main method? public void main(String[] args) public static void main(String[] args) public static void main() none of the above 3 / 10 3. Java is short for "JavaScript". True False 4 / 10 4. Is an empty .java file a valid source file? True False 5 / 10 5. What is the default value of byte variable? 0 0.0 null not defined 6 / 10 6. Object-Oriented Programming means.. Being objective about what you develop Designing the application based on the object discovered when analysing the problem Writing an algorithm before writing your program and having a test plan. Writing a program composed of java classes 7 / 10 7. Is it necessary that each try block must be followed by a finally block? True False 8 / 10 8. How do you create a variable with the numeric value 5? int x =5; float x =5; x =5; num x =5 9 / 10 9. How do you create a variable with the floating number 10.0? float x =10.0f; byte x =10.0f; int x =10.0f; x =10.0f; 10 / 10 10. Java keywords are written in lowercase as well as uppercase. True False Your score is The average score is 72% LinkedIn Facebook Twitter 0% Restart quiz