Share on Google+Share on Google+

joginder singh
1 Answer(s)      8 years ago
Posted in : Java Beginners


View Answers

October 13, 2008 at 2:57 PM

Hi friend,

A keyword in C++ that lets you freeze the value of a reference or of the fields in an object. There is no direct equivalent in Java. Java has the final keyword and the concept of immutable Objects.

volatile :
It is used on variables that may be changes simultaneously by other threads.
It is used in variable declarations that specifies that the variable is modified asynchronously by concurrently running threads.
It is used on variables that may be modified simultaneously by other threads.This warns the compiler to fetch them fresh each time,
rather than caching them in registers

assert :

An assertion checks a boolean-typed expression that must be true during program runtime execution.

Assertion statements have two forms as given below

assert expression;

assert expression1 : expression2;

For example :

assert value > 5 ;

assert balance > 0;

assert isCondition();

transient :

The transient keyword is used to indicate that the member variable should not be serialized
when the class instance containing that transient variable is needed to be serialized.

public class Class1{
private transient String password;

instanceOf :

class Parent {
public Parent() {


class Child extends Parent {
public Child() {

public class MainExample{
public static void main(String[] a) {

Child child = new Child();
if (child instanceof Parent) {



For more information on java visit to :


Related Tutorials/Questions & Answers:
Java Keywords
Java Keywords       There are few keywords in Java programming language. Remember, we cannot use these keywords as identifiers in the program. The keywords const and goto
Core java keywords
Core java keywords  How java keywords are stored in library
Java Keywords
Java Keywords       There are few keywords in Java programming language. Remember, we cannot use these keywords as identifiers in the program. The keywords const and goto
Java Keywords
Java Keywords       There are few keywords in Java programming language. Remember, we cannot use these keywords as identifiers in the program. The keywords const and goto
Keywords - Java Beginners
Keywords  what is const,volatile,assert,transient,instanceof i know these are Keywords but i can't understand what is use and what they are plz tell me and give me the example   Hi friend, const A keyword
keywords in java - Java Interview Questions
keywords in java  hi familiars... how many keywords are there in java?   Hi Friend, Please visit the following link: Thanks
JAVA Keywords Highlighting Puzzles IN JAVA
JAVA Keywords Highlighting Puzzles IN JAVA  Syntax Highlighting SCENERIO 1 When given a set of keywords we need to identify the occurrences of keywords in given input text and mark them with [blue] color attribute Sample
Java Programming Keywords
Java  Programming Keywords Java is rich programming language... and mobile applications. Here in this post I am listing all the 48 keywords of Java programming language. There are 48 Keywords in Java abstract boolean
java keywords - Java Interview Questions
java keywords  which one of the following keywords has highest associated active cpu usage? 1)break 2)throw 3)final 4)while 5)continue  Hi sreenu, import*; public class BreakExample{ public
Objective-C keywords
Objective-C keywords       Here in this section we will know about the keywords used in objective... and C++ should compile as objective-c. It provides some additional keywords
Keywords Articles
analyzer so that we can find keywords that attract more searches. The whole text... the better grasp of the communicated matter. Mere use of SEO keywords... writers refrain from overuse of the keywords without loosing on any
title and keywords don't refresh in webpage - JSP-Servlet
title and keywords don't refresh in webpage  Hi, I changed the title and keywords on my main jsp page that is the entry point into my web... and keywords. If I change anything else on the jsp page it refreshes
where is the definition of keywords like this, int, void present in Java ? e.g the definition of methods are in API.
where is the definition of keywords like this, int, void present in Java ? e.g the definition of methods are in API.  where is the definition of keywords like this, int, void present in Java ? e.g the definition of methods
Java Keywords
Java Keywords Keyword is a reserved word in programming language which is predefined. Because it has a special meaning. keyword cannot be used as name for class, method and function. Keyword cannot be used as a identifier also
Java try, catch, and finally
Java try, catch, and finally         The try, catch, and finally keywords are Java keywords that are used to handle the exception in a program.  The mechanism to handle
Basic Java Language Elements
Basic Java Language Elements       Java keyboards There are few keywords in Java programming language. Remember, we cannot use these keywords as identifiers
The do Keyword
The do Keyword          Keywords are special symbols in the Java programming language, which are reserved for a Java program. The do is a Java keyword, that may
Objective C Constructors
Objective C Constructors       Objective-C enables user to define constructor with the help of self and super keywords. Like java Objective-C has parent class and programmer
Java Break keyword
and for handling these loops Java provides keywords such as break and continue respectively. Among these Java keywords break is often used in terminating the loops
Java Break loop
Java Break loop       Java contains its own Branching Category in which it has two keywords of opposite nature, break and continue respectively. In the following example break
Mysql Time Now
we use now ( ) keywords in Mysql which returns you the current time. (now
Access Modifiers and Garbage Collection
-counting memory management system through retain and release keywords
Java Basics Exercises Tutorial
that includes its definition, feature, code, keywords, etc. Definition: Java... simultaneously saving time. Java language has built-in Networking. Keywords: In Java, keywords are used in datatypes, methods, class declaration, etc. Keywords
SEO Copywriting
specific keywords on a web page that is targeted for specific search... and limit in terms of keywords phrase and genuine content. Thus the ranking..., for this the hard keywords can be able to get the high ranking You must also have
features like methods, data members, access controls, constructors, keywords...;   int y;   int get(int p, int q){   x=p; y=q; return(0);   }   void 
Java Break continue
Java Break continue       Java has two keywords break and continue in its branching category. 'break' allows users to give end to a loop whereas with 'continue
Difference between throw and throws in java.
Difference between throw and throws in java. Throws and throw both are keywords in java, used for handling the exception.  When a method is not able to handle the checked exception, it should declared with throws keyword
Recovering Blog From Penguin 2.0 Update Penalty
Text: The recent penguin update could penalize exact match anchor text keywords
Inheritance in Java with example
inheritance and interface inheritance. extend and implement keywords are used
JSF Search Application Using Ajax
components that one is the text box component which is for entering keywords whatever
Java Tutorial
, Features of Java, keywords in Java, DataTypes in Java, conventions in Java, Java... Keywords In Java Keywords are the reserve word for doing specific task the programming language's compiler understands. Java has also keywords some
Java Spring Hibernate Struts Training What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? file location SASLError using PLAIN: not-authorized how to convert war file into .exe file using java code


Advertisement null