Yee Tien Lee

Greenhorn
+ Follow
since Mar 19, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Yee Tien Lee

Got it solved by using frames... but don't really like it... any other solutions?
Hi all,
I'm having "Access is Denied" JavaScript error for a form containing <input type=file>, and the form is submitted via JavaScript form.submit().
The submission works fine without <input type=file> or form.submit(), but they just can't co-exist.
Anyone has the workaround for this?
Thanks
Hi all,
Thanks for replying!
Got the point for ic3! However for ic4, it's the answer from a mock test. Can I say that the answer is wrong?
Hi Praful,
Thank you for replying! Also thanks for pointing out my error I still don't know the terminology well.
I've tried ic3 & ic4 with other class, and I've got the following errors.
Test.java:293: cannot resolve symbol
symbol : class InnerClass
location: class Test
InnerClass ic3 = new OuterClass().new InnerClass();
C:\j2sdk1.4.1\bin>javac Test.java
Test.java:294: not an enclosing class: OuterClass
OuterClass.InnerClass ic4 = new OuterClass.InnerClass();
The only line that works fine and I can think of is: OuterClass.InnerClass ic3 = new OuterClass().new InnerClass();
Could you explain to me why is it so?
Hi all,
I would like to know whether the following declaration for InnerClass (ic1 to ic4) are valid.
I've compiled and run the code and there's no error. However, the answer for the question are only ic3 and ic4. Can anyone explain to me which is correct? Thanks in advance!
public class OuterClass
{
public static int i;
class InnerClass {}
public void innerClassDemo()
{
InnerClass ic1 = new InnerClass();
InnerClass ic2 = new OuterClass.InnerClass();
InnerClass ic3 = new OuterClass().new InnerClass();
OuterClass.InnerClass ic4 = new OuterClass.InnerClass();
}
}