Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
can you please explain what the return type can be possibly?
shoeb sayyed
Ranch Hand
Posts: 48
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
public class Test { returnType methodA(byte x, double y) { //It can be either of int, float, short, double, byte or long? return (short) x/y * 2; } } /*(short) x/y * 2; by seeing this what you think the returnType should be? and why?*/
Thanks,
Shoeb
Bert Wilkinson
Ranch Hand
Posts: 33
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Dude,
your code examples are poorly formatted (if at all), your questions are out in left field, and it appears you haven't tried to implement any of the code and try it out for yourself....
Get an intro
Java
book, and do some Homework.
Cheers.
Campbell Ritchie
Marshal
Posts: 79177
377
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Since that is obviously a
homework
or course question, we expect you to provide what you think the answer is. Bert Wilkinson is correct.
shoeb sayyed
Ranch Hand
Posts: 48
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hey guys i am really sorry
i would now onwards do my homework well and then post it if and only if i have any problem with the concepts
Thanks Guys
Thanks,
Shoeb
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
what's the narrowest valid return type for the method
A question ! thanks
More...