Win a copy of Spark in Action this week in the Open Source Projects 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Doubt on chapter 1 review question 23 Sybex

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Book- Sybex
chapter-1
Review questions - question number -23
I thought option f is also correct because the option tells the name of the .class which is similar to option d.
But when I saw answer it made me confuse because they used the word extension but in option f they did not include extension they just told name of the .class
Or am I over thinking 😬😬??
 
Marshal
Posts: 69740
277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that the book by Jeanne Boyarsky and Scott Selikoff? Thank you for giving us the question number, but for those of us who don't have the book please copy the question. I can only answer your query if I know what the book says.
 
Luanrkiran kumar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question--> 23. Which of the following are true? (Choose all that apply)
A. javac compiles a .class file into a .java file.
B. javac compiles a .java file into a .bytecode file.
C. javac compiles a .java file into a .class file.
D. Java takes the name of the class as a parameter.
E. Java takes the name of the .bytecode file as a parameter.
F. Java takes the name of the .class file as a parameter.



book explanation--->  C, D. Java puts source code in .java files and bytecode in .class files. It does not use
a .bytecode file. When running a Java program, you pass just the name of the class
without the .class extension.
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luanrkiran,
F is incorrect. It is saying that "java Main.class" is correct rather than "java Main".
 
    Bookmark Topic Watch Topic
  • New Topic