A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Java in General
Author
in the below code what could be the statement to display the output of a+b.
naved momin
Ranch Hand
Joined: Jul 03, 2011
Posts: 675
I like...
posted
Jul 18, 2011 12:28:49
0
in the below code what could be the statement to display the output of a+b.
class Test2 { int show(int a , int b) { return a+b; } public static void main(String[] args) { Test2 t = new Test2(); t.show(25 , 30); } }
The Only way to learn is ...........do!
Visit my blog
http://inaved-momin.blogspot.com/
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16479
2
I like...
posted
Jul 18, 2011 13:11:21
2
Do you know what is the code to display a value?
naved momin
Ranch Hand
Joined: Jul 03, 2011
Posts: 675
I like...
posted
Jul 19, 2011 07:39:54
0
Paul Clapham wrote:
Do you know what is the code to display a value?
i know i got that
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
4
posted
Jul 19, 2011 08:03:12
1
Why have you got a method called
show(...)
, which doesn't show anything?
I agree. Here's the link:
http://aspose.com/file-tools
subject: in the below code what could be the statement to display the output of a+b.
Similar Threads
Constructors
Understanding inheritance
Something weird about static imports
Super class constructor calls derived class overridden method?
Final Constructors?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter