educationalera

  • Increase font size
  • Default font size
  • Decrease font size

Java Language

AddThis Social Bookmark Button

11.) Which of the following keywords is used to invoke a method in the parent class?

A) This

B) Super

C) Final

D) Static

View Answer

Answer: Option B


12.) Which of the following statements are true? (Select all that apply.)

A) A final object’s data cannot be changed.

B) A final class can be subclassed.

C) A final method cannot be overloaded.

D) A final object cannot be reassigned a new address in memory.

E) None of the above.

View Answer

Answer: Option D


13.) What will be the result of compiling and running the given program?

public class exception

      {

           public static void main(String args[])

          {

               System.out.println("A");

               Try

               {

                   System.out.println("B");

                   System.exit(0);

              }

              catch(Exception e)

             {

                   System.out.println("C");

             }

           Finally

           {

                System.out.println("D");

           }

          }

}

A) Program compiles correctly and prints "A" when executed.

B) Program compiles correctly and prints "A" and "B" when executed.

C) Program compiles correctly and prints "A" and "C" when executed.

D) Program compiles correctly and prints "A","B" and "C" when executed.

View Answer 

Answer: Option B


14.) What will be the result of compiling and running the given program?

class strings

{

       public static void main(String arg[])

      {

         if("String".indexOf("S",-10) ==0)

         {

               System.out.println("Equal");

         }

        Else

       {

             System.out.println("Not Equal");

       }

}

}

A) Compile time error as we passed negative value in indexOf() method.

B) Run time error as we passed negative value in indexOf() method.

C) Program compiles and prints Equal when executed.

D) Program compiles and prints Not Equal when executed.

View Answer

Answer: Option C


15.) Which of the following statements are true?

A) An inner class may be defined as static.

B) There are NO circumstances where an inner class may be defined as private.

C) An anonymous class may have only one constructor.

D) An inner class may extend another class.

View Answer

Answer: Option A, D

 
JPAGE_CURRENT_OF_TOTAL


Oracle Certification

oracle_logo

The Oracle Certification Program is a professional certification program offered by the Oracle Corporation. There are three levels of Oracle Certification in several disciplines: Oracle Certified Associate (OCA), Oracle Certified Professional (OCP), and Oracle Certified Master (OCM).

Java Certification

java_logo

Sun Certified Professional (SCP) is a professional certification program by Sun Microsystems, a subsidiary of Oracle Corporation. There are two levels of java Certification in several disciplines: Sun Certified Java Associate (SCJA), Sun Certified Java Programmer (SCJP), and Sun Certified Java Developer (SCJD)

Red Hat Certification

red_hat_logo

The Red Hat Certification Program is Red Hat's professional certification program for Red Hat and general Linux related skills such as system administration on Red Hat Enterprise Linux Red Hat Certified Technician (RHCT)  and Red Hat Certified Engineer (RHCE)