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



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


neelam
Java modifiers
2 Answer(s)      4 years ago
Posted in : Java Interview Questions


What modifiers may be used with top-level class?

Advertisement
View Answers

October 16, 2010 at 4:34 PM


The top level class may used only public,final or abstract modifiers.


June 1, 2012 at 11:36 PM


Mostly in java we use the *public* key word to initialize the top class .it helps us to access the class in any program.In heritance we don't make all class public because we extends the base class into another class ' for example: class abc {}

class xyz extends abc {public static void main(String args[])

{ System.out.println("good morning programmers");

}} here class xyz can be public but class abc never be public



Related Tutorials/Questions & Answers:
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
Advertisements
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
Java access modifiers
Java access modifiers  If a class is declared without any access modifiers, where may the class be accessed
Nonaccess Member Modifiers - Java Beginners
Nonaccess Member Modifiers  what is Nonaccess Member Modifiers give me the simple programs thxx   Hi friend, Non-access modifiers... be variously applied to different Java elements. An abstract class cannot
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
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
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
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 Modifiers
Access Modifiers       Access Modifiers : Access modifiers are used to specify the visibility and accessibility of a class, member variables and methods. Java provides
Access Specifiers and Access Modifiers
Access Specifiers and Access Modifiers  What are Access Specifiers and Access Modifiers
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
Java interface
Java interface  What modifiers may be used with an interface declaration
java program
java program  java program to implement the reflection of a particular class details like constructor,methods and fields with its modifiers
java
java   What are different types of access modifiers?  Access modifiers are an integral part of object-oriented programming.Access modifiers can be used to restrict access, and therefore functionality, to certain
Access Modifier
modifiers (final, static, synchronized) of Java classes, interfaces, methods
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
java
java  differentiate the access modifiers :static,abstract,final.finalise
Java - Java Beginners
Java  1. What are access specifiers and access modifiers? 2. Difference between access specifiers and access modifiers
java
java  Can we define private and protected modifiers for variables in interfaces?  no  No , We can not define private and protected modifiers for variable in interface
java - Java Interview Questions
java  what is the differnce between acess specifiers and acess modifiers
Java Interview Questions - Page 6
Java Interview Questions - Page 6   ... a growable array of objects What modifiers may be used with an inner class... that is implemented in a language other than Java
Java Abstraction - Java Beginners
Java Abstraction  If we declare a class as abstract then it contains... a variable then what is the access modifiers that variable should be?  Hi Friend, Please visit the following links: http://www.roseindia.net/java/master
Listeners - Java Beginners
Listeners  How to use KeyListeners in Java GUI ? Please give simple...) + ")"; } int modifiers = e.getModifiersEx(); modString = "modifiers = " + modifiers; tmpString = KeyEvent.getModifiersExText(modifiers
java - Java Interview Questions
java  1. Can constructers be declared as PRIVATE in a java file... variale?  Hi Friend, 1)Constructor can have any of the access modifiers...: http://www.roseindia.net/java/java-classpath.shtml Thanks
code problem - Java Beginners
and methods. Java provides some access modifiers like: public, private etc... than mom...?  Hi Friend, Access Modifiers : Access modifiers
java - Java Interview Questions
Modifiers :: Which gives additional meaning to data, methods and classes...: They are : public, private, or protected. Access Modifiers :: Which gives.../java/java-access-modifier.shtml Thanks
java
java  What are Transient and Volatile Modifiers?  Transient: The transient modifier applies to variable only, and it is not stored as part of it's objects persistent state.Transient variables are not serialized
java
java  what 2 access modifiers that can encapsulate the attributes of class?? and what is the concept of printf?   Hello Friend, Public and Private can encapsulate the attributes of class. Printf formats the strings
Advertisements
 

 

 

DMCA.com