Java is a ........... language.
A. weakly typed
B. strongly typed
C. moderate typed
D. None of these
Answer: Option B
Solution(By Examveda Team)
The correct answer is Option B: strongly typedIn Java, it is recognized as a strongly typed language. A strongly typed language enforces strict type checking, meaning that the data type of a variable is checked at compile time and any type mismatches are not allowed without explicit typecasting.
Here's an explanation of the other options:
- Option A:
weakly typed
does not apply to Java. Weakly typed languages are those that allow for automatic type conversions and do not enforce strict type checking.- Option C:
moderate typed
is not a standard term in programming language classification. Java is typically classified as strongly typed.- Option D:
None of these
is not the correct choice as Java is indeed classified as a strongly typed language.
Join The Discussion
Comments ( 7 )
Related Questions on Data Types and Variables
What is the maximum value that can be stored in a byte variable in Java?
A. 127
B. 255
C. 32767
D. 64
What is the default value of an int variable in Java if it's not explicitly initialized?
A. 0
B. 1
C. -1
D. Null
Which of the following is not a valid identifier for a Java variable?
A. my_var
B. _myVar
C. 3rdVar
D. $var
public class solution {
public static void main(String args[]){
short x = 10;
x = (short) (x5);
System.out.print("x="+x);
}
}
It will show error as The multiplyExact() method deals with only integer and double type values. So use int instead of short then it will run properly.
Java js independent language because it works both hardware and software. it works different different platform
like windows, linux , apple etc. it works byte code i.e WORA (write once and read anywhere). It is robust and secure
language (i.e Exception handling and Multithreading) so,it makes strong.
Java is a strongly typed programming language because every variable must be declared with a data type. A variable cannot start off life without knowing the range of values it can hold, and once it is declared, the data type of the variable cannot change.
yes yes
A strongly typed programming languages is one that requires the type of a variable to be explicitly stated. Java is a strongly typed language. You must declare the type of data and variable to store the data.
Bcoz all the variables declared with its data type such as int.,char,Boolean etc