Java Programming - Language Fundamentals - Discussion
Discussion Forum : Language Fundamentals - General Questions (Q.No. 2)
2.
Which one of these lists contains only Java programming language keywords?
Answer: Option
Explanation:
All the words in option B are among the 49 Java keywords. Although goto reserved as a keyword in Java, goto is not used and has no function.
Option A is wrong because the keyword for the primitive int starts with a lowercase i.
Option C is wrong because "virtual" is a keyword in C++, but not Java.
Option D is wrong because "constant" is not a keyword. Constants in Java are marked static and final.
Option E is wrong because "include" is a keyword in C, but not in Java.
Discussion:
63 comments Page 1 of 7.
Akshay Nikule said:
2 months ago
- Keywords are the words which already know to the compiler.
- In Java there are 49 keywords.
- Keywords also known as 'Reserve words'
- There are 51 'Reserve words' in Java.
- Every keyword is reserve word, but not every reserve word is not keyword
- 'Const' and 'goto' is Reserve word but not keywords.
- In Java there are 49 keywords.
- Keywords also known as 'Reserve words'
- There are 51 'Reserve words' in Java.
- Every keyword is reserve word, but not every reserve word is not keyword
- 'Const' and 'goto' is Reserve word but not keywords.
Jeevanantham said:
1 year ago
Goto keyword is used in C language also, then how do say that it is only in Java language?
Anyone please explain to me.
Anyone please explain to me.
(4)
Saurabh said:
4 years ago
Though goto is not a frequently used keyword, still a keyword,
And here, the question is which has only one keyword (whether used or not used is not mentioned).
And here, the question is which has only one keyword (whether used or not used is not mentioned).
(2)
Pavithra said:
4 years ago
In Java, we use the goto keyword when we write "labelled break " to break for loops.
(2)
Rakesh said:
6 years ago
In java there is no "goto" statement. Then how is the option B is correct.
(1)
Sagar shinde said:
6 years ago
I think (A) is correct answer because the all keyword in answer (A) is used in java, as your answer (B) the GOTO keyword is not used in java. Because the flow of execution of program in java use bottom-up approach and it does not support the GOTO keyword.
(2)
Vipul said:
8 years ago
Goto is a keyword in java and c/c++. So how it is java only keyword?
(2)
Naseem said:
8 years ago
Wrong, "goto" is not a java keyword.
(1)
Alok Raj Singh said:
8 years ago
But goto is also use in C Language.
(1)
Mukesh said:
8 years ago
c++ use goto as well. So how could option (b) is correct?
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers