This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes whats wrong with my code ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

whats wrong with my code ?

naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 688

i have created a constructor in my class and initialize variables inside the construct
what i want is when i ll call a method and pass a argument while creating a object to constructor , the method should print my new value
the code is

in the output i want the new value i.e 56 and to achieve this , any one can help me in learning this one !

The Only way to learn is!
Visit my blog
Rob Spoor

Joined: Oct 27, 2005
Posts: 19649

Once is enough. UseOneThreadPerQuestion. Closing this one.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: whats wrong with my code ?
Similar Threads
Reg.naming variables
can a sub class reference access private variable of super class?
Multiple file Project
Question about inheritance
Threas - Object Locks Question