• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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: 5413
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's very easy to test, is it not?
 
Marshal
Posts: 64182
215
  • 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 wijdan
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 wijdan
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: 64182
215
  • 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 wijdan
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
 
What are you doing? You are supposed to be reading this tiny ad!
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!