ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
what are the different access specifiers that can be used 
by interfaces and abstract classes? can anyone give me 
detailed description on this
 Question Submitted By :: Suma
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what are the different access specifiers that can be used by interfaces and abstract classes? can anyone give me detailed description on this
Answer
# 1
that is nothing but access specifiers only

public
private
default
and one im not getting
 
Is This Answer Correct ?    3 Yes 1 No
Venkateswara Reddy
 
  Re: what are the different access specifiers that can be used by interfaces and abstract classes? can anyone give me detailed description on this
Answer
# 2
public
private
protected
default
 
Is This Answer Correct ?    2 Yes 1 No
Prasanna
 
 
 
  Re: what are the different access specifiers that can be used by interfaces and abstract classes? can anyone give me detailed description on this
Answer
# 3
public accsess specifier means it can publically accessed 
by the class whether it's subclass of that class or present 
in same packege or diffrent classes.

private access specifier is private to that class i.e. it 
cant access out side the class

procted -it's accesesed by the sub class of the ckass 
whether that present in the sane package or diffrent but it 
must be a subclass

noacces accessed with in the same package
 
Is This Answer Correct ?    2 Yes 1 No
Dhiren
 
  Re: what are the different access specifiers that can be used by interfaces and abstract classes? can anyone give me detailed description on this
Answer
# 4
i feel with interface we can use public and default.and 
with abstract we can use all except private
 
Is This Answer Correct ?    3 Yes 1 No
Neha Jain
 
  Re: what are the different access specifiers that can be used by interfaces and abstract classes? can anyone give me detailed description on this
Answer
# 5
This question leads to two things 
1. modifier for abstract class or interface
2. modifier for members of abstarct class or interface

For first in abstract class and interface we can have 
public , protected and default and not private if it is top 
level otherwise private also if it is nested

for point 2 
in an interface every member variable is public and final
in an abstract class you can assign any modifier to member 
variables
 
Is This Answer Correct ?    3 Yes 0 No
Vishal Arora
 
  Re: what are the different access specifiers that can be used by interfaces and abstract classes? can anyone give me detailed description on this
Answer
# 6
I guess if members of interface are declared final then 
they can't be overridden & hence this hampers the logic 
behind having interfaces...

Interface can only be Public/Default or abstract.In any 
other case it can't be overridden & hence of no use.

MemberFunctions also behave similarly.
 
Is This Answer Correct ?    2 Yes 0 No
Malay Tripathi
 
  Re: what are the different access specifiers that can be used by interfaces and abstract classes? can anyone give me detailed description on this
Answer
# 7
Interface: Public or default
Abstract Class (Anything ) : public , private or Default


Iam sure about these answears
-uday
 
Is This Answer Correct ?    2 Yes 1 No
Uday
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is difference between method overloading & method overridding with example? IBM2
suppose in a class there is a code like this: { Set hs=new Hashset(); hs.add(new Emp("kathy",1000)); hs.add(new Emp("kathy",2000)); } how can u avoid the above code in your class as set won't allow duplicate objects?  2
why java does not support mulitple inheritance directly? TCS2
when i write string s1="java"; in one program(application) and string s2="java"; in another application on the same jvm will both objects s2,s2 will refer to same memory location where "java" is stored in string pool.  2
I have a Person object with 5 variables and I want to store them in a file called Person.txt. What should I do? KPIT3
What is cloneable interface?  5
What enableEvents() method do?  1
what is a transient variable?  4
what is main purpose of interface? Accenture2
Can a for statement loop indefinitely?  3
waht happens when a return type ,even void is specified for a constructor?  10
Can a double value be cast to a byte?  3
In the first round, there are 30 aptitude and 30 java questions. We are suppose to finish both the papers within 60 minutes. I cleared this round. Next was test for programming skills. In this section, Some 7 n's were asked. 1. What is the difference b/w sleep(1000) and wait(1000) 2. what is the diff b/w static block and static function? 3. Write a program to validate IP address using string tokenizer. 4. Write a program to create singleton class 5. write a function to reverse the string 6. Write a prog to print prime nos upto n. EX: If n=9, It shld print 1,2,3,5,7 7. One program on collections- Write a program to print no. of times a number is repeating in an array. EX- {1,3,1,2,5,7,3,7,34,3,8,3} It should print: 1- 2 times 3- 4 times and so on 7. Write a func to print fibonocci series After this I had technical interview, which went on for. 60 mins or so. There were qn's about multi threading, Exception handling and collection classes. Knowledge about collections was very important for the post I was interviewed for. Huawei1
what is difference between front controller and action servlet?  2
what is the form of storage space in java?  5
What is Applet Flickering ? Persistent1
what is wrapper class and its uses?  2
what is diff bet iterator and enumeration?  2
what is the difference between cd & dvd ? Satyam11
Name the class that used to read objects directly from a stream? Wipro2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com