aspose file tools*
The moose likes Beginning Java and the fly likes data types Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "data types" Watch "data types" New topic
Author

data types

kevinn lee
Ranch Hand

Joined: Feb 15, 2010
Posts: 87

how can I make this compile without making changes in method printB?
thanks
Mikey Schmidt
Greenhorn

Joined: Apr 03, 2010
Posts: 3
cast the int to a byte while calling the printB method
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4522
    
    5

Cast the int parameter to byte.


luck, db
There are no new questions, but there may be new answers.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Guys, let's let him do his own homework next time: please see DoYourOwnHomework and NotACodeMill.

Instead, provide hints, like "What type does the method expect?" and "What type is an uncast numeric literal?" with links to the relevant documentation does (at least) two things: highlights what the problem is (without giving an answer) and stimulates the Java thought process--and that's what we're all about.

Thanks!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: data types
 
Similar Threads
class dependency problem.
Why public?
Constructor exception doubt
Print ab1, ab2, ab3 With Threads
Anonymous inner class