how many access specifiers are available in java

Answers were Sorted based on User's Feedback



how many access specifiers are available in java..

Answer / anjani kumar jha

There are four access specifiers are available in java

Public-----------access to all

Private---------limited to class only

Protected---------limited to sub package of class

Default------------limited to same package

Is This Answer Correct ?    52 Yes 10 No

how many access specifiers are available in java..

Answer / hani

4

Is This Answer Correct ?    28 Yes 7 No

how many access specifiers are available in java..

Answer / ashish shinkar

there are 4 access specifier in java
1: private
2: default
3: protected
4: public

Is This Answer Correct ?    15 Yes 10 No

how many access specifiers are available in java..

Answer / geethanjali

4

Is This Answer Correct ?    6 Yes 3 No

how many access specifiers are available in java..

Answer / kunal

There are atleast 11 access specifiers..
public , private , protected , default , final , volatile, static,transient, abstract, native, synchronized in java

Is This Answer Correct ?    6 Yes 5 No

how many access specifiers are available in java..

Answer / crimohan

in java only access modifiers are present.there is no access specifiers in java

Is This Answer Correct ?    1 Yes 0 No

how many access specifiers are available in java..

Answer / gyana

there are four access specifier in java.they are

public - means the the properties of class is accessable
to all other classes.
private- means the the properties of class cannot
accessable to any other classes.
protected- means the properties of class will acessed only
to its subclasses,not subclasses of its subclasses.
no access - mean you can access it with in the class.

Is This Answer Correct ?    6 Yes 6 No

how many access specifiers are available in java..

Answer / umanath

Namely 4, but functionally 5
public--------------access to all

protected-----------limited to any class in same package and
sub class of any package

friendly(default)---limited to same package only

private protected---limited to sub classes of any package only

private-------------limited to same class only

Is This Answer Correct ?    7 Yes 7 No

how many access specifiers are available in java..

Answer / suresh

4

Is This Answer Correct ?    3 Yes 4 No

how many access specifiers are available in java..

Answer / joshua deku

There are 4 access specifiers in java
1.public
2.private
3.protected
4.private

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

Will the compiler creates a default constructor if I have a parameterized constructor in the class?

0 Answers  


import java.io.*; class Demo { public static void main(String args[]) { File f=new File("1234.msg"); String arr[]=f.list(); System.out.println(arr.length); } }

3 Answers   IBM, Ramco,


What is user defined exception in Java?

0 Answers   TCS,


What modifiers are allowed for methods in an interface?

0 Answers  


How are variables stored?

0 Answers  


What is difference between module and function?

0 Answers  


What are the two types of java programming?

0 Answers  


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator<RegistryKey> subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

0 Answers   Google,


what is java

10 Answers  


Is a class subclass of itself?

0 Answers  


Which oo concept is achieved by using overloading and overriding?

0 Answers  


Can we use both this () and super () in a constructor?

0 Answers  


Categories