Java OCA OCP Practice Question 105

Question

Which statements about calling the compilation command javac and the execution command java are true?

  • I. java may use a period . to separate packages.
  • II. javac takes a .java file and returns a .class file.
  • III. java may use a slash (/) to separate packages.
  • A. I only
  • B. II only
  • C. I and II
  • D. I, II, and III


C.

Note

The javac command takes a text-based .java file and returns a binary byte code .class file, making II a true statement.

The java command uses a period (.) to separate packages, not a slash (/).

Option I is a true statement and Option III is a false statement.

Option C is the correct answer.




PreviousNext

Related