Page 67 - iPro_trackGPT_V5_Class8
P. 67

4.  Identify the literal that is enclosed in single quotes and contains exactly one character.

                        a. Character                                   b. String

                        c. Boolean                                     d. Floating-point

                     5.  Which of the following is the correct way to add a comment in Java?
                        a. \\                                          b. //

                        c. /*….*/                                      d. /**…*/


                 B.  Write ‘T’ for true and ‘F’ for false.
                     1.  Java is a platform-independent language.                                         .....................

                     2.  A Java interpreter is a program that translates the source code written by
                        us into machine-readable code.                                                    .....................
                     3.  Java is not a case-sensitive language.                                           .....................

                     4.  The semicolon at the end of the System.out.println() statement marks the
                        end of the line known as the line terminator.                                     .....................
                     5.  Primitive Data Types are also called reference data types.                       .....................


                 C.  Fill in the blanks using the words given below:

                                            Keywords, BlueJ, Operators, Variables, Object bench



                     1.  .......................... is an IDE specifically designed for beginners to write Java programs.

                     2.  The area at the bottom of the BlueJ window where you can interact with objects is called
                        ...........................

                     3.  .......................... are special reserved words that have a predefined meaning and cannot serve

                        as identifiers.
                     4.  .......................... are memory locations where values are stored.


                     5.  .......................... are used as symbols to direct the compiler or interpreter to carry out specific
                        mathematical, logical, or other operations.

                 D.  Match the following:

                     1. ==                                  a. Returns the remainder  after  performing the
                                                               division operation
                     2. !=                                  b. This  operator  is  used to check the equality
                                                               between two values.
                     3. !                                   c. This operator  is used to check the  inequality
                                                               between two values.

                     4. %                                   d. Returns ‘true’ value if the condition returns false



                                                                                              Program Coding     65
   62   63   64   65   66   67   68   69   70   71   72