geek oak

Greenhorn
+ Follow
since Feb 02, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by geek oak

Hi
The pgjc-engine.jar contains the mock test as an Application
if I am referring the same jar file then this should work fine...
Check & compare the bytes of your download...
java -jar pgjc-engine.jar
Regards
RK


[This message has been edited by geek oak (edited February 05, 2001).]
The code compiles fine and it should compile fine..
Sample is a valid constructor which gets triggered before the init method..

[This message has been edited by geek oak (edited February 04, 2001).]
1) Inner class can make the code compact when performing event handling
for example :-
if you are using an applet with mouse events either you need to implement an interface or an adapter. Interfaces should be defined with all the event methods atleast with dummy functions,if adapters are used you cannot extend both applet and MouseAdapter, though we can define a separate class for the MouseAdapter, still we need to give additional code to access Applet's data and methods inside the Mouse Event Class..
in this scenario if InnerClass is used the task and the code will be very simple
// inside init method of Applet
// anon inner class
addMouseListener(new MouseAdapter())
{
/*here your mouse code is given...
the code given here can access applet's data and methods because inner class can access all the private data.. of the enclosing class
*/
});
Inner Class can totally encapsulate all inner class code which is solely needed only by the class where it is defined...
with inner class you can encapsulate the class declaration itself... while private encapsulates data members and methods..
if the inner class code can be re-used in other part of your application you won't normally go for Inner Class even though you can do so my making public inner classes

Note:- you can almost do everything without using inner class

[This message has been edited by geek oak (edited February 04, 2001).]