Can string be considered as a keyword?



Can string be considered as a keyword?..

Answer / Avaneendra Pathak

"No, String is not considered a keyword in Java. Keywords are reserved words in the Java programming language and cannot be used as identifiers for variables or methods. While 'String' is an important class, it can still be used as a variable name as long as it doesn't collide with any other identifier."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is multiple inheritance & can we implement it in java?

6 Answers   Satyam,


What is Garbage Collection in Java

1 Answers   Wipro,


How transient variable is different from volatile variable?

1 Answers  


IS method overriding is Duplication of Methods?

5 Answers   CybAge,


What is natural ordering in java?

1 Answers  


What are the 2 types of java programs?

1 Answers  


Explain the pointers in Java?

1 Answers   Aspire,


I need some details about an employee. i have only the employee id in my presentation layer(JSP).I entered that ID and click "Show Details" Button. Question is how the JSP pass that id to Controller layer and DAO and what mechanism we are using to retrive data from DB and how the data passed to JSP as a Output. Please explain in detail.

1 Answers   TCS,


Why char array is favored over string for the storage of passwords?

1 Answers  


What are the two parts of a conditional statement?

1 Answers  


I have a string like _a01_a02_a03_ and another string like _2_1.5_4_ as input.I want to extract a01,a02... to a string array and 2,1.5,etc to a double array with a01 corresponds to 2 and a02 to 1.5 etc. Need code in core java.. Can you do it?

1 Answers   Cognizant,


Which class represents the socket that both the client and server use to communicate with each other?

1 Answers  


Categories