Multiple choice

Which of the following statements about the Java language is true?

  1. Both procedural and OOP are supported in Java.

  2. Java supports only procedural approach towards programming.

  3. Java supports only OOP approach.

  4. None of the above.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Java is a hybrid language that supports both procedural and object-oriented programming paradigms. While primarily designed as an OOP language with classes, objects, inheritance, and polymorphism, Java also supports procedural programming through static methods and primitive types. You can write procedural-style code in Java, especially in the main method or utility classes.