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



Home Answers Viewqa Java-Interview-Questions Access Specifiers and Access Modifiers

Have Programming Question? Ask it here!
 
 
 


samar
Access Specifiers and Access Modifiers
3 Answer(s)      3 years and 9 months ago
Posted in : Java Interview Questions


What are Access Specifiers and Access Modifiers?

Advertisement
View Answers

October 29, 2010 at 3:53 PM


Hi,

Here is the answer,

Access specifiers :

The access specifier determines how accessible the field is to code in other classes. Access ranges from totally accessible to totally inaccessible. You can optionally declare a field with an access specifier keyword: public, private, or protected,default.

Access Modifiers :

You can optionally declare a field with a modifier keyword: final , volatile, static, transient, abstract, native, synchronized.

Thanks.



February 25, 2012 at 2:13 AM


        Access Specifier Vs Access Modifier

Access Specifier:-The access specifier determines how accessible the field is to code in other classes. Access ranges from totally accessible to totally inaccessible. You can optionally declare a field with an access specifier keyword: public, private, or protected,default.

Access Specifier are of 4 types in java

Public:-Anything declared as public can be accessed from anywhere means outside the class accessibility will be possible

Private:-Anything declared as private can not be accessed outside the class.

Protected:- Anything declared as protected can be accessed inside the same package and subclasses of the different package

default:-If you not decalred anything in front of any variable then it will be declared as default automatically. Anything declared as default can be accessed only to classes in the same package.

Access Modifier:- Access Modifier are those which change or modify the accessibility of any variable. which gives additional meaning to data, methods and classes e.g. final cannot be modified at any point of time..

                     You can optionally declare a field with a modifier keyword: final , volatile, static, 
                     transient, abstract, native, synchronized.


April 2, 2012 at 3:12 PM


hi, this is gopi from bangalore in my prepective both access specifies and modifier both are same in c++ we call it as specifier so don't use it as specifier in java u just call it as modifers

when you define before any that modifies there meaning in java ex;public ,protected,private,synchronized,volatile,native,transient,abstract

so there is no concept access specifier in java this term related to c++ not java this is true

if you have any queries in java



Related Tutorials/Questions & Answers:
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
Advertisements
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
Access specifiers
Access specifiers  Why we are giving "public static void main"? How many times declared the main()?   Hi Friend, We used this statement as it provides the "entry point" for the program. Whenever the program executes
Java access modifiers
Java access modifiers  If a class is declared without any access modifiers, where may the class be accessed
Access Modifiers
Access Modifiers       Access Modifiers : Access modifiers are used to specify the visibility... some access modifiers like: public, private etc.. These can also be used
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 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 public protected private default For more details about access
methods and access specifiers in java - Java Beginners
methods and access specifiers in java  i am a java beginner..give me the rules f methods and access specifiers  Hi friend, visit for more information: http://www.roseindia.net/java/ http://www.roseindia.net
access
access   This is Nitha Sriram i am having a problem that, i am having a combo box in the JSP page when i select an item from that i am calling the onchange function. In javascript i am getting the value now i want to pass
Using Protected Access in JSP
Using Protected Access in JSP          In java there are three types of access specifiers: public, protected, private. We always declare access specifiers
Access Specifier
Access Specifier  What's the usage of getter and setter in access specifier? Thank You
Access level
Access level  Which access level allows exclusive access to the attributes and methods that belong to a class or classes derived from that class? default protected public private
How to Access MS Access in jar.
How to Access MS Access in jar.  how do i access my Ms-Access file... to access it via Code or is their any alter-native?? Do i need any Driver to do this ... i m able to access a Ms-access via JDBC but cant find the file wen
ms access
ms access  how to delete the autonumber from ms access using java delete code
MS access
MS access  how do i access my Ms-Access file placed in the same jar file where my application code/class file r present??? Want to access it via Code. Can anyone help me ? Please give reply urgent...   give me reply
connectivity with access
connectivity with access  how to connect with data base with access...; Is this Access database or excel sheet. Do you want to display the values...;Is this Access database or excel sheet. Do you want to display the values in Textarea
Ms Access
Ms Access   How to get query for Primary key from MsAccess?   SELECT column_name FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE table_name = 'data';   SELECT column_name FROM INFORMATION_SCHEMA.KEY_COLUMN
MS-Access
MS-Access  I am trying to upload a image to ms-acess using jsp,and my problem is that it shows some error int the browser that "java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect ".I think i set
ms access
has to login . i already created ms access page and inserted values throught... and password" from my ms access............and detail in register(table in my ms access) need to display values in jsp .............please help me dis is my
ms access
has to login . i already created ms access page and inserted values throught... and password" from my ms access............and detail in register(table in my ms access) need to display values in jsp .............please help me dis is my
ms access
has to login . i already created ms access page and inserted values throught... and password" from my ms access............and detail in register(table in my ms access) need to display values in jsp .............please help me dis is my
ms access
has to login . i already created ms access page and inserted values throught... and password" from my ms access............and detail in register(table in my ms access) need to display values in jsp .............please help me dis is my
MS ACCESS
-> data sources. 2)Click Add button and select the driver Microsoft Access... = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb... CONNECTION (MA ACCESS) LET ME KNOW IN MY PROGRAM WHERE I AM GOIN WRONG PLEASE
MS ACCESS
-> data sources. 2)Click Add button and select the driver Microsoft Access... = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb... CONNECTION (MA ACCESS) LET ME KNOW IN MY PROGRAM WHERE I AM GOIN WRONG PLEASE
MS ACCESS
-> data sources. 2)Click Add button and select the driver Microsoft Access... = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb... CONNECTION (MA ACCESS) LET ME KNOW IN MY PROGRAM WHERE I AM GOIN WRONG PLEASE
Access Modifiers and Garbage Collection
Access Modifiers and Garbage Collection  ... provide public and private access modifiers as well. 3. @protected accessifier... Objective-C's ability to integrate with C++ code and libraries Access Privileges
access into radio button
access into radio button  access the four fields of database called access,access file and stored in radio button.please help
VoIP Access
VoIP Access Mediatrix VoIP Access Device The Mediatrix 2102... modem - without the need for an external router. The Mediatrix 2102 VoIP access... Access Telecom carriers have been launching IP-based services to meet
insert code jsp to access
insert code jsp to access   insert code jsp to access
Random Access File.
Random Access File.  Explain Random Access File
connect many access sheet to one access sheet
connect many access sheet to one access sheet   hellow sir. i have six application page it has attribute name rollno(primary key) and attendance... access sheet as name rollno attendance of 1,2nd,3rd.....6th
How to access Subclass?
How to access Subclass?  How to access subclass in java? please tell me the syntex with an example
Access web.xml init parameters
Access web.xml init parameters  How to access web.xml init parameters from java code
Access Infotech, Hyderabad - JDBC
Access Infotech, Hyderabad  Hello friends Access Infotech is the fast growing company in hyderabad
Random Access File class
Random Access File class  Write a short note on Random Access File class.   Please visit the following link: Java Random Access File
Access Infotech - Java Beginners
Access Infotech  Best Growing IT Company in hyderabad(Access Infotech) Access Infotech unit 4b,4th floor, topaz building, punjagutta, hyderabad-500082. for more queries contact tel:-04030584311 www.accessinfotech.in
Jdbc MS-Access question
Jdbc MS-Access question  How to delete records from the three table in MS-Access? They are in relationship with each other regarding to data field
Jdbc MS-Access question
Jdbc MS-Access question  How to delete records from the three table in MS-Access? They are in relationship with each other regarding to data field
how to access the MS ACCESS database with java
how to access the MS ACCESS database with java   how to access the MS ACCESS database with java how can we insert,delete,update,search records of ms access with java   Java MS Access database connectivity Follow
Data Access Object
Data Access Object  Hi sir/madam please give me some tutorial/example about Data Access Object   Hi Please Find the example of Java Data Access Object http://www.roseindia.net/tutorial/java/jdbc
RANDOM ACCESS FILE CONCEPT
RANDOM ACCESS FILE CONCEPT  In a random access file, first write the alphabets a,b, c, d till z. Read the file in reverse order and print it on screen
Tomcat access to network files
Tomcat access to network files  i have web application which is running on tomcat 6.0, it access network files from JSP. but i am getting an errror. please help
ACCESS DATABASE FROM HTML
ACCESS DATABASE FROM HTML  I want to access sql 2008 database in html page without help of ADODB connection.. because if access through ADODB means there is a security problem. so, Access database in html page(client side
Access a variable local and globally
Access a variable local and globally  how can we access a variable local and globel??   hello, if you want to access your variable... *)[[UIApplication sharedApplication] delegate]; and then access your variable like
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... will be available to all its derived classes. Default - If no access modifier
Direct Access of PDF
Direct Access of PDF  Hi During the security audit of my project ,i got an case in report dat is no one can access the pdf file without login.I have no's of pdf in a folder,but problem is this any1 can open the pdf by knowing
Connect database in Access to Netbean?
Connect database in Access to Netbean?  how to connect database in micrsoft access to Netbean?i know it can be connected by using JDBC-ODBC bridge, can i know the steps in connecting the database? Is there any source code
J2ME connectivity to ms access
J2ME connectivity to ms access  How to establish client server connectivity to access ms access database on the server side? I have made the odbc connection. Plz help me in the coding part.. Dont know how to start
Advertisements
 

 

 

DMCA.com