Java modifiers

Java modifiers

What modifiers may be used with top-level class?
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 linksADS_TO_REPLACE_1 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
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
Modifiers are allowed in interface
Modifiers are allowed in interface  hello, What modifiers are allowed for methods in an Interface?   hello,ADS_TO_REPLACE_1 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
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
ModuleNotFoundError: No module named 'access-modifiers'
ModuleNotFoundError: No module named 'access-modifiers'  Hi, My... named 'access-modifiers' How to remove the ModuleNotFoundError: No module named 'access-modifiers' error? Thanks   Hi, In your
help regarding variable types and its modifiers
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
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 Modifier
modifiers (final, static, synchronized) of Java classes, interfaces, methods
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
Java - Java Beginners
Java  1. What are access specifiers and access modifiers? 2. Difference between access specifiers and access 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... in a language other than Java
java
java  differentiate the access modifiers :static,abstract,final.finalise
java - Java Interview Questions
java  what is the differnce between acess specifiers and acess 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
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
code problem - Java Beginners
and methods. Java provides some access modifiers like: public, private etc... than mom...?  Hi Friend, Access Modifiers : Access modifiers
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
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
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
hi
hi  what are access modifiers available in java
java - Java Interview Questions
, member variables and methods. Java provides some access modifiers like: public...java  what is meant by the following fundamentals as used in java... in nature so they can not be directly instantiated. Modifiers------- Access
access modifier - Java Interview Questions
access modifier  can someone explain to me all about java access modifier including the defualt modifier.  Hi Friend, Access Modifiers: Public Modifier- The public members can be accessed anywhere by any class
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.ADS_TO_REPLACE_1 Printf
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 code - Java Beginners
Java code  Can you tell me the difference between volatile and transient modifiers with an example? Thank you in advance  Hi friend, Hi friend, The transient is a keyword defined in the java programming language
Class in Java
Class in Java       In this section, we will discuss about java classes and its structure. First of all learn:  what is a class in java and then move on to its
Fields in java class
Fields in java class       In this section, we will explore the concept of the fields in the reference... style. Static: This type of modifiers are define to the class not to the object.ADS
Core Java Interview Question, Interview Question
Core Java Interview Question Page 27       Modifiers Question: What are access modifiers... cannot be subclassed Question: Where can static modifiers be used ADS
WebServer - Java Server Faces Questions
WebServer  What is WebServer? Do i need one for the Java programming?  Answer for question no:1 difference between web container and web... have variables with modifiers static and final. I think this only may be the reason
reflection
reflection  java program to implement the reflection of a particular class details like constructor,methods and fields with its modifiers
Core Java tutorial for beginners
Core Java tutorials for beginners makes its simpler for novices to learn the basic of Java language. In order to make it simpler to understand, the Java guide section is divided into two sections: Core Java and Advanced Java
Java Tutorial
In this section we will discuss about the Java Programming Language. This tutorial covers all the topics of Java Programming Language. In this section you will learn about what is Java, Download Java, Java environment set up
core java - Java Beginners
core java  question1:- what is default members?  Hi Friend, If there is no access modifiers(public, private, protected etc) declared with any variable or method or class, then it means that there is a default
Core Java Topics
Core Java Topics Following are the topics, which are covered under Core Java. In the roseindia website for core java, programmer will find completed details of every core java topic and simple example of core java that will help you learn
Core Java Interview Question, Interview Question
Core Java Interview Question Page 18       Question: Is &&= a valid Java... primitive Java types. Answer: The eight primitive types are byte, char, short, int
Core Java Interview Question, Interview Question
Core Java Interview Question Page 17  ... access modifiers, where may the class be accessed? Answer: A class that is declared without any access modifiers is said to have package access. This means
Encapsulation VS Abstraction - Java Beginners
(); } Abstraction-The process of abstraction in Java is used to hide certain details... with the outside view of an object (interface). Modifiers: If you want
Inner class in java
Inner class in java In this example we will describe inner classes in java.... Inner classes provides an graceful and powerful feature to the Java. Inner..._TO_REPLACE_2 Local classes:- This class is defined within a block of Java code
Core Java Training
Core Java training provided online by Roseindia covers the basic of Java... are also shown and discussed in detail. Java programming has become quintessential... Java to run properly. All web browsers are Java enabled and have widgets

Ads