Results 1 to 9 of 9
Thread: Object creation and construstion
- 12-15-2009, 04:35 AM #1
Member
- Join Date
- Nov 2009
- Location
- Colombo, Sri Lanka
- Posts
- 22
- Rep Power
- 0
Object creation and construstion
Reason for the result?
Java Code:[COLOR="Red"]class Test { Test t; int i; Test() { System.out.println(t + "," + i); t = new Test(); i = 10; } public static void main(String[] args) { Test t = new Test(); System.out.println(t.t + "," + t.i); } }[/COLOR]Last edited by abimaran; 12-15-2009 at 05:20 AM. Reason: I wrote 4 instead of 'for' - So sorry!
-
Your thoughts first?
edit: I see that you've done this before: dump questions without showing that you've created a thoughtful answer yourself. For your own sake, I ask you to stop doing this. You're only hurting yourself.
- 12-15-2009, 05:11 AM #3
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
- 12-15-2009, 05:22 AM #4
Member
- Join Date
- Nov 2009
- Location
- Colombo, Sri Lanka
- Posts
- 22
- Rep Power
- 0
Sir, 4 isn't the result. It's my mistake (just for shorten the language). Now I edit it. Thanks in advanced!
-
You still haven't replied to my post. Sorry to be blunt, but please prove to us that you have more than just two neurons connected by a spirochete.
Last edited by Fubarable; 12-15-2009 at 05:54 AM.
- 12-15-2009, 06:09 AM #6
Member
- Join Date
- Nov 2009
- Location
- Colombo, Sri Lanka
- Posts
- 22
- Rep Power
- 0
Sir, I couldn't get the point you said!
- 12-15-2009, 06:21 AM #7
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
What is the result when you run that code?
-
Please prove to us that you are not either dumb, careless, or just plain lazy. Please show us that you've at least made an attempt to answer this yourself first before posting a question, any question.Sir, I couldn't get the point you said!
Is this clear now?Last edited by Fubarable; 12-15-2009 at 01:39 PM.
- 12-15-2009, 09:58 AM #9
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Similar Threads
-
Jar file creation
By raghu9198 in forum New To JavaReplies: 4Last Post: 01-11-2009, 03:40 AM -
bmp creation
By makpandian in forum New To JavaReplies: 1Last Post: 12-17-2008, 05:33 PM -
Java GUI creation help?
By sabrown311313 in forum New To JavaReplies: 4Last Post: 09-13-2008, 06:28 AM -
Object creation and memory issues
By bugger in forum New To JavaReplies: 11Last Post: 11-29-2007, 12:56 PM -
creation of new function
By an8086 in forum Advanced JavaReplies: 1Last Post: 07-16-2007, 02:20 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks