• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

data types

 
kevinn lee
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

how can I make this compile without making changes in method printB?
thanks
 
Mikey Schmidt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cast the int to a byte while calling the printB method
 
Darryl Burke
Bartender
Posts: 5132
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cast the int parameter to byte.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic