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?
class, if, void, long, Int, continue
goto, instanceof, native, finally, default, throws
try, virtual, throw, final, volatile, transient
strictfp, constant, super, implements, do
byte, break, assert, switch, include
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:
62 comments Page 3 of 7.

Deep Vakharia said:   10 years ago
Goto is not used in java and as an alternative java has provided us inner and out loop function we can break the loop that we want to. So there's no use of goto in Java.

Kirankumar said:   10 years ago
Sir goto is a keyword of C not keyword of Java right (or) wrong?

Veerapaga srinivasulu said:   1 decade ago
Yes goto is Java keyword but not use.

Sum said:   1 decade ago
Include is not a keyword in C. It is not in the list of words of 32 keywords of C.

Satya said:   1 decade ago
Can you give explanation about "program driven languages" and "event driven languages"?

Vishesh said:   1 decade ago
None of the option is correct. Given answer B having goto is keyword of both Java and C.

Thiru said:   1 decade ago
Goto is not used in java because,

In older language(BASIC,COBOL) are "program driven languages where program logic drives the users, so they decide the flow, hence need "GoTo".

But todays, languages, are "Event driven languages", where application's objects (menu, buttons, form elements ...) are listening user's response and go by it.

Rahul said:   1 decade ago
What's the whole idea behind this ?

Arul said:   1 decade ago
What is the use of instance & native keyword? can you give example?

Puri kiki said:   1 decade ago
"goto" have got what purpose in java?


Post your comments here:

Your comments will be displayed after verification.