M
Q. Identify the incorrect statement?
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
Be the first to start discuss.
Q. What is the default value of boolean in java
Q. Which of these classes is used to define exceptions?
Q. ------------------- is an example of container class
Q. String constants are said to be_____ of string class.
Q. Type promotion in Java usually refers to ____.
Q. An Array in Java is a collection of elements of ___ data type.
Q. Java has a distinction of supporting special operators known as
Discusssion
Login to discuss.