Core Java - Interview Questions and Answers for 'Literals' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Core Java - Interview Questions and Answers for 'Literals' - 3 question(s) found - Order By Newest

 Q1. Can we use true and false as identifiers in java ? Are they keywords in Java ?Core Java2017-04-30 09:40:17

Ans. true and false are literals in java. No we cannot use them as identifiers.

  Sample Code for literal

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     identifiers  keywords  literals


Related Questions

 What are the some literals in java that are reserved and hence cannot be used as identifiers ?
 What is the difference between keywords, identifiers and literals in java ?


 Q2. What are the some literals in java that are reserved and hence cannot be used as identifiers ? Core Java2017-04-30 09:42:24

Ans. true , false and null

  Sample Code for literals

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     literals


Related Questions

 Can we use true and false as identifiers in java ? Are they keywords in Java ?
 What is the difference between keywords, identifiers and literals in java ?


 Q3. What is the difference between keywords, identifiers and literals in java ?Core Java2017-04-30 09:45:27

Ans. Keywords are the reserved words that have a pre defined meaning for the compiler and hence are restricted to be used as identifiers.

Identifiers are the name assigned to different programming constructs like classes, interfaces, methods , variables etc.

Literals are the values that are assigned to Identifiers.

For example

int count = 0;

in the above statement "int" is a keyword, "count" is an identifier and "0" is a literal

  Sample Code for keywords

  Sample Code for identifiers

  Sample Code for literals

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     keywords  literals  identifiers


Related Questions

  Which of the following combination of keywords is illegal in Java ?

a. static and transient
b. transient and final
c. static and synchronized
d. abstract and final
  How does volatile affect code optimization by compiler?
  Can we access instance variables within static methods ?
  What is Volatile keyword used for ?
  What is the use of Transient Keyword ?
  What is a Final Method ?
  Can we override static methods ? Why ?
  What is "super" used for ?
  What is "this" keyword used for ?
  Which of the following keyword is not permitted for outer class ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: