fundamental of java programming coursera week 1 quiz answers

Java Basics - Practice Quiz

1. Which of the following is a feature of Java?

  • Compiled language
  • Static typing
  • Dynamic memory allocation
  • Garbage collection

2. Which of the following is a difference between C++ and Java?

  • Memory management
  • Syntax
  • Platform independence
  • Object-oriented programming (OOP) features

3. Which of the following is a feature of Java?

  • Multiple inheritance
  • Operator overloading
  • Templates
  • Exception handling

4. Which of the following is a difference between C++ and Java?

  • Memory management
  • Syntax
  • Portability
  • Object-oriented programming (OOP) features

5. Which of the following is a feature of Java?

  • Pointers
  • Multiple inheritance
  • Operator overloading
  • Bytecode compilation and interpretation

Java Fundamentals - Graded Quiz

6. What is JVM in the context of Java?

  • Java Virtual Machine
  • Java Runtime Environment
  • Java Development Kit
  • Java Compiler

7. What is JRE in the context of Java?

  • Java Virtual Machine
  • Java Runtime Environment
  • Java Development Kit
  • Java Compiler

8. What is JDK in the context of Java?

  • Java Virtual Machine
  • Java Runtime Environment
  • Java Development Kit
  • Java Compiler

9. What is the main function of JVM in Java?

  • To compile Java source code into Java bytecode.
  • To execute Java bytecode and run Java programs.
  • To provide a development environment for Java programmers.
  • To manage memory and garbage collection in Java programs.

10. What is the purpose of the "public static void main(String[] args)" in a Java program?

  • To define the entry point of a Java program.
  • To define a static method in a Java class.
  • To define a public method in a Java class.
  • To define a void method in a Java class.

Leave a Reply