M

Manisha Agrawal • 9.34K Points
Tutor III

Q. Identify the incorrect statement?

  • (A) Java is programming language
  • (B) Java is a platform
  • (C) Java is dynamically typed
  • (D) Java is statically typed
  • Correct Answer - Option(C)
  • Views: 343
  • Filed under category JAVA

Explanation by: Java Developer
Java is not a dynamically typed language; it is a statically typed language. This means that variable types are checked at compile-time, not at runtime.

Static Typing in Java

When you declare a variable in Java, you must specify its type explicitly.

Once assigned, the type cannot change.


Example:

int num = 10;  // 'num' is explicitly declared as an integer
num = "Hello"; // ❌ Compile-time error: incompatible types

This strict type-checking helps catch errors early, making Java a strongly typed and statically typed language.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics