Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Java building blocks  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii everyone ^_^,

Given the following class, which of the following calls print out Blue Jay and why?



A. java BirdDisplay Sparrow Blue Jay
B. java BirdDisplay Sparrow "Blue Jay"
C. java BirdDisplay Blue Jay Sparrow
D. java BirdDisplay "Blue Jay" Sparrow
E. java BirdDisplay.class Sparrow "Blue Jay"
F. java BirdDisplay.class "Blue Jay" Sparrow
G. Does not compile.

Many thanks,
 
Saloon Keeper
Posts: 5040
134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's very easy to test, is it not?
 
Marshal
Posts: 61722
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Manar Katih wrote:Hii everyone ^_^, . . . ,

Welcome to the Ranch

Please always tell us where such code comes from, to reduce problems with copyright. I shall give you a hint: look in the Java™ Tutorials.
 
Manar Katih
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:That's very easy to test, is it not?


Thank you for your intervention,
i know that B is the correct answer
i mean why B apply ?
(by the way i mentionned "Beginning Java")
 
Manar Katih
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Manar Katih wrote:Hii everyone ^_^, . . . ,

Welcome to the Ranch

Please always tell us where such code comes from, to reduce problems with copyright. I shall give you a hint: look in the Java™ Tutorials.



ouups i'm sorry i didn't mean it
Thanks a lot for your help
 
Campbell Ritchie
Marshal
Posts: 61722
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Manar Katih wrote:. . . i mean why B apply ? . . .

Didn't the Java™ Tutorials link I gave you help?
 
Manar Katih
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Manar Katih wrote:. . . i mean why B apply ? . . .

Didn't the Java™ Tutorials link I gave you help?


Yeah that's helpful !
thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!