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



Home Answers Viewqa Java-Beginners Nonaccess Member Modifiers
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


joginder singh
Nonaccess Member Modifiers
2 Answer(s)      6 years and a month ago
Posted in : Java Beginners



Advertisement
View Answers

October 25, 2008 at 10:57 AM


Hi friend,


Non-access modifiers (abstract, final, native, static, strictfp, synchronized, transient, volatile) can be variously applied to different Java elements.


An abstract class cannot be instantiated. It can be extended by an abstract or non-abstract class.
A class must be declared abstract if it has one or more abstract methods.

For example:

abstract class myClass {
protected int i;
int getInt() {
return i;
}
abstract int setInt(int i);
}

abstract method

An abstract method does not have a body. Its declaration ends with a semicolon instead of braces. It must be declared in an abstract class.

A non-abstract subclass must implement all the methods declared as abstract in its superclasses.

Example:

abstract int getInt();
Notes

abstract cannot be combined with final and/or static.


-------------------------------------------

Visit for more information.

http://wwww.roseindia.net/java/master-java/abstract-class.shtml

Thanks.


October 25, 2008 at 10:58 AM




Related Tutorials/Questions & Answers:
Nonaccess Member Modifiers - Java Beginners
Nonaccess Member Modifiers  what is Nonaccess Member Modifiers give me the simple programs thxx   Hi friend, Non-access modifiers (abstract, final, native, static, strictfp, synchronized, transient, volatile) can
Access Modifiers
Access Modifiers       Access Modifiers : Access modifiers are used to specify the visibility and accessibility of a class, member variables and methods. Java provides
Advertisements
Java modifiers
Java modifiers   What modifiers can be used with a local inner class
Java modifiers
Java modifiers  What modifiers are allowed for methods in an Interface
Java modifiers
Java modifiers  What modifiers may be used with top-level class?  The top level class may used only public,final or abstract modifiers
Access Modifiers in java
Access modifiers are used to specify the visibility and accessibility of a class, member variables and methods. There are four type of access modifiers... modifiers click on the following links Create Subpackages
Modifiers are allowed in interface
Modifiers are allowed in interface  hello, What modifiers are allowed for methods in an Interface?   hello, Only public and abstract modifiers are allowed for methods in interfaces
Access Specifiers and Access Modifiers
Access Specifiers and Access Modifiers  What are Access Specifiers and Access Modifiers
java memory allocation for member variables and member functions
java memory allocation for member variables and member functions  Suppose I have created a class named test with a member function name fun... not create a main method then will the memory be allotted for member function fun
call to a member function
call to a member function  While uploading the data on server i am getting following error... call to a member function children
Java access modifiers
Java access modifiers  If a class is declared without any access modifiers, where may the class be accessed
Member Classes
Member Classes       The class defined in the body of a class is called a member class. Member classes can also use instances of the same class without explicit
access specifiers and access modifiers
access specifiers and access modifiers  I want a powerpoint presentation for access specifiers and access modifiers. Please send me the same and soon
What modifiers are allowed for methods in an Interface?
What modifiers are allowed for methods in an Interface?   Hi, What modifiers are allowed for methods in an Interface? thanks
Explain various access modifiers and their visibility.
Explain various access modifiers and their visibility.  Explain various access modifiers and their visibility.   Please visit the following link: Java Access Modifiers
What is a local, member and a class variable?
What is a local, member and a class variable?   Hi, What is a local, member and a class variable? thanks
What does it mean that a class or member is final?
What does it mean that a class or member is final?   hi, What does it mean that a class or member is final? Thanks
what is the difference between access specifiers and access modifiers in java?
what is the difference between access specifiers and access modifiers in java?  what is the difference between access specifiers and access modifiers in java
Member Classes, Inner Nested Classes in java
Member Classes        Member classes are defined within the body of a class. We can use member classes anywhere within the body of the containing class. We declare member classes
How to access sub class member using super class object
How to access sub class member using super class object  class A{ } class B extends A{ int b=1; } class Test{ public static void main(String args[]) { what to do here to access sub class variable b using super class object
making consistency of data member in the whole programme without using static keyword
making consistency of data member in the whole programme without using static keyword  In the below programme i use one boolean variable named check , which is being accessed inside main function by two objects of Tst1 and Test2
In data structure in java how to parse the given string and counts the member of character that match the given data?
In data structure in java how to parse the given string and counts the member of character that match the given data?  Design a parser that parse the given string and counts the member of character that match the given data.using
Java Interview Questions - Page 6
a growable array of objects What modifiers may be used with an inner class that is a member of an outer class? A (non-local) inner class may be declared
Access Modifiers and Garbage Collection
Access Modifiers and Garbage Collection       Previously it was a requirement to allocate... provide public and private access modifiers as well. 3. @protected accessifier
Access Static Member Of The Class Through Object
Access Static Member Of The Class Through Object  ...;  * Access static member of the class through object.  ...;   // call a static member only by class name.   
PHP Mutator Accessor
PHP Mutator and Accessor Methods: In object-oriented programming, the mutator method (also called "setter") is used to initialize the member... of the private data member. These methods can be implemented on non-object-oriented
ArrayList in JSP
ArrayList in JSP ArrayList is a class and a member of Java Collection Framework. It is the resizable-array and permit all element including the null. It is similar to Vector but it is unsynchronized. Iterator return the element from
Acucorp - ACUCOBOL-GT Eclipse Plug-in
Acucorp - ACUCOBOL-GT Eclipse Plug-in          Acucorp is a member of the Eclipse Foundation, a non-profit corporation formed to advance
Access Modifier
modifiers (final, static, synchronized) of Java classes, interfaces, methods
Dynamic Types in Objective-C
is of the given class or not, given method is member of the given class or not etc. Table...) isKindOfClass: classObj is object a descendent or member of classObj -(BOOL) isMemberOfClass: classObj is object a member of classObj
 

 

 

DMCA.com