Monday, 19 March 2012

Internet, Web Programming and Java MCQ 11


  1. A _________ is a collection of classes.


a.       Method
b.      Object
c.       Package
d.      Java


  1. The Number of related classes can be grouped into a _______ package.


a.      Single
b.      Double
c.       Multiple
d.      None of these


  1. Java packages are categorized into ____ types:


a.       3
b.      4


c.       5                                                                                     d.   2
  1. The names of  java packages are:


a.       API packages
b.      User-defined packages
c.       Both a & b
d.      None of these


  1. Some of the quit frequently used packages are:


a.       java.lang, java.io
b.      java.awt, java.applet
c.       java.sql, java.util
d.      all of these


e.       
  1. According to java naming conventions, the name of the package start with a:


a.       Uppercase
b.      Lowercase
c.       Title case
d.      Toggle case


  1. The names of the classes begin with an:


a.      Uppercase
b.      Lowercase
c.       Title case
d.      Toggle case


  1. To create a user-defined package, first a package must be declared using the keyword _________ followed by the name of the package.


a.       class
b.      object
c.       package
d.      public  



  1. The API package and user-defined packages can be accessed using the ______ statement.


a.       Conditional
b.      import
c.       public
d.      private 


  1. API is stands for:
a.       Advance programming interface
b.      Applet programming interface
c.       Application programming interface
d.      Application programming inheritance
  1. API packages contain all the _________ classes.


a.       Main
b.      Standard
c.       Object
d.      None of these


  1. The ________ package is a type of API package that is automatically imported.


a.      java.lang
b.      java.awt
c.       java.util
d.      java.io


  1. The import statement can be used to access a ______ package in a program.


a.       Singular
b.      Particular
c.       Both of these
d.      None of these


  1. __________ includes classes that are fundamental to java, such as String, Math etc.


a.       java.awt
b.      java.io
c.       java.sql
d.      java.lang


  1. _________ package provides classes to support input and output operations.


a.       java.awt
b.      java.io
c.       java.sql
d.      java.applet


  1. __________ provides a set of classes to implement graphical user interface components, such as windows, dialogue boxes, menus etc.


a.      java.awt
b.      java.io
c.       java.sql
d.      java.applet





  1. ________ package include classes to create applets can be embedded in a web page.


a.       java.awt
b.      java.io
c.       java.sql
d.      java.applet


  1. ________ package includes language utility classes, such as time, date, random number, hash tablets etc.


a.       java.lang
b.      java.util
c.       java.sql
d.      java.io


  1. The syntax to access the same class in various place is:
a.      import package_name.class_name;
b.      import package name class_name;
c.       import package name class.name;
d.      import package name.class_name
  1. Anything which is declared as ________ can be only within the class.


a.       public
b.      private
c.       protected
d.      default   


  1. When a member is declared as ________ , it can be accessed everywhere.


a.      public
b.      private
c.       protected
d.      default


  1. A member declared as ________ is accessible not only to all the classes and subclasses in the same package but also to sub class in other packages.


a.       public
b.      private
c.       protected
d.      default

1 comment :