Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 6 The Java compiler ignores any text between ____. A. /* and */ B. */ a

ID: 3864229 • Letter: Q

Question

QUESTION 6

The Java compiler ignores any text between  ____.

A.

/* and */

B.

*/ and */

C.

/# and #/

D.

/ and /

   

QUESTION 7

Which one of the following is a valid header for a constructor for a class called Car?

A.

Public void Car()

B.

public Car(String model)

C.

public class Car(String model)

D.

public car(String model)

   

QUESTION 8

In Java, the = operator

A.

causes output to appear in the BlueJ Terminal Window

B.

tests for equality

C.

sets a variable to the given value

D.

has no definition

   

QUESTION 9

In Java, the statement

days++;

has the same effect as

A.

days = days + 1;

B.

days = days + days;

C.

days + 1 = days;

D.

days = 1;

   

QUESTION 10

Which of the following are Java naming conventions?

#1:       Classes start with an uppercase letter


#2:       Methods (except for the constructor) start with an uppercase letter


#3:       Objects start with a lowercase letter


#4:       Objects start with an uppercase letter


#5:       Classes start with a lowercase letter


#6:       Methods (except for the constructor) start with a lowercase letter

A.

#4, #5 and #6

B.

#1, #2 and #4

C.

#1, #3 and #6

D.

#3, #5 and #6

A.

/* and */

B.

*/ and */

C.

/# and #/

D.

/ and /

Explanation / Answer

QUESTION 6
Java Compiler ignores everything written between /*____*/

/*___*/ sign is usd to provide multiline comments in java
that is not read by compiler.
you canc add comments in your code to give details about your method,variables etc.

Question 7
public Car(String model)

Constructor has public access modifier.
Constructor should have the same name as the Class name(Case sensitive)
Constructor can not have any return type.
Constructor can have zero or more arguments

All these criteria meets for option B only so that is the answer.

Question 8
= is an assignment operator
so the answer is
sets a variable to the given value

Question 9
days++;
this is equvivalent to days=days+1

Question 10
#1:       Classes start with an uppercase letter
#3:       Objects start with a lowercase letter
#6:       Methods (except for the constructor) start with a lowercase letter

so the answer is option C

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote