It's not a secret anymore!
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "data types" Watch "data types" New topic

data types

kevinn lee
Ranch Hand

Joined: Feb 15, 2010
Posts: 87

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

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

Joined: May 03, 2008
Posts: 5115

Cast the int parameter to byte.

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

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.

I agree. Here's the link:
subject: data types
It's not a secret anymore!