Originally posted by Jon Aryan:
True,,, interfaces provide just the declarations of method and implicitly these methods are "public abstract".
Interfaces are useful when some classes implements it, or some other interfaces extends it.
The interface "LayoutManager" is implemented by classes like FlowLayout, GridLayout etc.
BorderLayout, CardLayout classes implements LayoutManager2.
LayoutManager2 extends LayoutManager.
So BorderLayout, CardLayout classes implements LayoutManager, but not directly.
I dun know whether i answered ur question the way u wanted !!.
[This message has been edited by Jon Aryan (edited October 06, 2000).]
Originally posted by Rong Chen:
just find something in the java bible, jls, which we can rely on, is says:
9.1.1.1 abstract Interfaces
Every interface is implicitly abstract. This modifier is obsolete and should not be used in new programs.
rong chen
Originally posted by Ajith Kallambella:
Methods in an interface are implicitly abstract.
An explicit "abstract" qualifier is redundant and
has no effect on compilation.
[b]abstract interface is same as interface.
interface with explicitly declared abstract methods need not be declared abstract( for abstract classes, this is not true ).
HTH
Ajith
[/B]
Originally posted by musa:
Hi
Double congrats yo the two of you
I think u have done a swell of a job esp being from a non maths
background.
this shows that where there is a will there is a way! ;-))
Originally posted by akshaysalkar:
How long does it take for one to prepare for the Java Exam(SCJP), if i am a beginner in Java. I have just spent 2weeks doing it and am hung at classes.
ak.
Originally posted by bala_chocos:
hi
anyone can help me . below is sun sample questions.please give the correct answer
1. What would be the result of attempting to compile and run the following piece of code?
public class Test {
static int x; public static void main
(String args[ ])
{System.out.println("Value is " + x);}
}
The output "Value is 0" is printed.
An object of type NullPointerException is thrown.
An "illegal array declaration syntax" compiler error occurs.
A "possible reference before assignment" compiler error occurs.
An object of type ArrayIndexOutOfBoundsException is thrown.
2. What should you use to position a Button within an application Frame so that the size of the Button is NOT affected by the Frame size?
a FlowLayout
a GridLayout
the center area of a BorderLayout
the East or West area of a BorderLayout
the North or South area of a BorderLayout
3. Which is the advantage of encapsulation?
Only public methods are needed.
No exceptions need to be thrown from any method.
Making the class final causes no consequential changes to other code.
It changes the implementation without changing the interface and causes no consequential changes to other code.
It changes the interface without changing the implementation and causes no consequential changes to other code.
4. Which of the following most directly supports retrieval of stored objects based on a unique key of String type?
Map
Set
List
Collection
Enumeration
5. Which statement is true about a non-static inner class?
It must implement an interface.
It is accessible from any other class.
It can only be instantiated in the enclosing class.
It must be final if it is declared in a method scope.
It can access private instance variables in the enclosing object.
6. Which are keywords in Java (select all that apply)?
NULL
sizeof
friend
extends
synchronized
7. Which declares an abstract method in an abstract Java class?
public abstract method();
public abstract void method();
public void abstract Method();
public void method() {abstract;/}
public abstract void method() {/}
1 a
2 a
3 e
4 c
5 c,e
6 d,e
7 b,c
The above mentioned answers are correct or not.if it is wrong
give me the correct answer ans explanation
Originally posted by shaik abdulla:
#107 Assume x = 0 and y=3. what is the value of x after x=y++;
Answer :3
I think the above answer is not correct.
x value is 4 and y is 3 after x=y++ is executed.
Originally posted by Sunita Vontel:
What I know about the Beta test is
they conducted an exam for free on august 23rd.This was I think because they are planning to change the questions and wanted to test.
Originally posted by MahaAdd:
Hi Deepak,
congrats!!!
how could u manage to get 98%??slogged very ...hard..
here's my email id: [email protected]
can u share the tips??
thanks,
[This message has been edited by Ajith Kallambella (edited August 31, 2000).]