QUESTION 1: Correct Which of the following lines contains a valid comment? A) int twoPi = 3.14159; /* holds the value of two times pi */ B) int twoPi = 2*3.14159; /* holds the value of two times pi //* C) int twoPi = 2*3.14159; / / *holds the value of 6 //* D) double twoPi = 2*3.14159; /* // holds the value of two time pi */ [comment] // QUESTION 2: Correct Which of the following lines does NOT consist of (a) valid, though boastful, comment(s)? A) // /* This is a */ First Rate Program B) //**// This is a //**// First Rate Program //**// C) //* This is a //*// First Rate Program //*// D) /* This is a //*// First Rate Program //*//
LANGUAGE: JAVA
CHALLENGE:
QUESTION 1: Correct Which of the following lines contains a valid comment?
A) int twoPi = 3.14159; /* holds the value of two times pi */
B) int twoPi = 2*3.14159; /* holds the value of two times pi //*
C) int twoPi = 2*3.14159; / / *holds the value of 6 //*
D) double twoPi = 2*3.14159; /* // holds the value of two time pi */ [comment] //
QUESTION 2: Correct Which of the following lines does NOT consist of (a) valid, though boastful, comment(s)?
A) // /* This is a */ First Rate Program
B) //**// This is a //**// First Rate Program //**//
C) //* This is a //*// First Rate Program //*//
D) /* This is a //*// First Rate Program //*//
SOLUTION:
Q1-A) int twoPi = 3.14159; /* holds the value of two times pi */ Q2-D) /* This is a //*// First Rate Program //*//