Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


joginder singh
Keywords
1 Answer(s)      6 years and a month ago
Posted in : Java Beginners



Advertisement
View Answers

October 13, 2008 at 2:57 PM


Hi friend,


const
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() {
super();
}
}

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

Child child = new Child();
if (child instanceof Parent) {
System.out.println("true");
}

}

}

For more information on java visit to :

http://www.roseindia.net/java/

Thanks


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
Advertisements
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: http://www.roseindia.net/java/language/java-keywords.shtml 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 java.io.*; 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
Inheritance
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
Advertisements
 

 

 

DMCA.com