We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

CS506 - Web Design and Development....Quiz No, 1 of CS506 will be conducted on Dec 03, 2015. Quiz will remain open for 2 days. Quiz no. 1 will be from Lectures 1 to 10.

Quiz No. 1 Dated: Nov 30, 15

Dear Students,

Quiz No, 1 of CS506 will be conducted on Dec 03, 2015. Quiz will remain open for 2 days. Quiz no. 1 will be from Lectures 1 to 10.

All the times are according to PKT (Pakistan Standard Time).

+ Click Here To Join also Our facebook study Group.

..How to Join Subject Study Groups & Get Helping Material?..


See Your Saved Posts Timeline

Views: 3931

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

Replies to This Discussion

Attachments:

Maga Quiz file

Attachments:
Mine latest Quizz

7:51pm, 4 Dec 2015

1_ A variable declared as static in a class is a/an _________
Class variable
 
 
 
2_ Which of the following operator is used to concatenate strings?
+
 
 
3_ All the exceptions and errors in java are inherited from _____ class.
Throwable 
 
 
4_ Exception handling code is written in _______
try block (not sure)
 
 
 
5_ Java program code is compiled into a form called ----------.
Byte code 
 
 
6_The following is an example of ___________. BufferedReader br = new BufferedReader(fr);
Byte oriented stream  (not sure)
 
 
7_ If there is a class "Student", then the java file must be saved with ______ name.
Student.java
 
 
8_ Based on functionality, the streams can be categorized as ________
Node stream and Filter stream 
 
 
9_ == operator compares _________ of strings whereas equals() method compares _________ of strings.
Addresses, values 
 
 
10_ Which of the following is true about AWT and SWING components?
 AWT components create a process whereas SWING component creates a thread.

Thank you so much to all of you.

A SUGGESTION, Kindly agr ap quizz TEXT mode mein save kr sakein to its quite better to HELP others,

Coz, images search mein nahi atay while students do their quizz. So, your little effort can do Great Help some one.

jazzak Allah.

Some old quizz,

Wich of the following is a general purpose container?

Select correct option:

JFrame

Dialog

JPanel

  • JApplet

 

 

Which of the following package needs to be import while handling files?

Select correct option:

java.util

  • java.io

java.awt

javax.swing

 

Exception handling code is written in _______

Select correct option:

try block ot confirm

catch block

finally block

  • throws clause

 

Which of the following stream is a Node stream?

 

PrintWriter

FileWriter

  • BufferedReader

All of given option

 

Which of the following stream read/write data in the form of bytes?

FileReader

FileWriter

PrintWriter

  • FileInputStream

 

Which of the following command is used to compile Java code?

java filename

  • javac filename.java

javac filename

java filename.java

 

 

 

Which of the following method is used to execute INSERT, UPDATE and Delete SQL statements?

  • executeQuery(sql);

ExecuteQuery(sql);

executeUpdate(sql);

ExecuteUpdate(sql);

 

 

Which of the following stream is a filter stream?

FileWriter

FileReader

  • BufferedReader

All of given options

 

 

 

An event in java is represented as ________

Operator

Function

  • Object

Primitive data type

 

Which of the following belongs to a category of checked exception?

Null Pointer exception

IOException

Array index out of bounds

NumberFormatException

 

Packages are the way to organize files into different -------------according to their functionality, usability as well as category they should belong to.

  • Directories

Folders

Libraries

None of these

 

When JSP page compiled, it is translated into?

Applet

Application

  • Servlet

Web Browser

 

From the following which ID is transmitted between the client and the server

  • Session ID

Network ID

Server ID

None of these

 

To define the error page in JSP we use following tag?       

  • exception-type

error-type

error-page

exception-page

 

Web.xml is a ___________

java file

  • configuration file

jar file

servlet

 

Which of the following is NOT a part of HTTP request?

Request method

URI

  • Status code

Header fields

 

Which of the following range of response code indicates that request was successful?

100-199

  • 200-299

300-399

400-499

 

 

Which of the following Environment variable tells the system about the root directory of TOMCAT?

JAva_HOME

  • CATALINA_HOME

CLASSPATH

PATH

 

Which of the following folder contains configuration file?

Classes

Lib

Bin

  • WEB-INF

 

Which of the following is NOT a web technoloy of Java?

Servlet

JSP

ASP

  • JSF

 

Which of the following approch is used to create threads in java?

inheritance

interface

  • Both inheriance and interface

None of these

 

Which of the following syntax attaches an output stream to console?

Select correct option:

  • FileWriter fw = new FileWriter(“output.txt”);

FileWriter fw = new FileWriter(FileDescriptor.out);

FileWriter fw = new FileWriter(FileDescriptor.in);

FileWriter fw = new FileWriter(FileDescriptor);

 

What will happen if static modifier is removed from the signature of main method?

Select correct option:

 

The program does not compile

The program compiles and runs successfully

  • The program compiles but does not run

None of given options

 

 

 

 

v  What will happen if main method is declared as private?

Select correct option:

The program does not compile

  • The program throws an exception at run time

The program compiles and runs successfully

None of given options

 

A collection can store _________

Select correct option:

Homogenous objects

Heterogeneous objects

  • Objects as well as primitive values

At most 100 objects

 

The toString() method returns a _________ representation of _______

Select correct option:

int, string

string, int

  • string, object

object, string

Based on functionality, the streams can be categorized as ________

Select correct option:

Byte oriented stream and Node stream

Filter stream and Character oriented stream

  • Node stream and Filter stream

Byte oriented stream and Character oriented stream

 

Which of the following stream read/write data in the form of bytes?

Select correct option:

FileReader

FileWriter

PrintWriter

  • FileInputStream

 

If a super class method is protected then overriding method _________

Select correct option:

must be protected

must be public

must be private

  • may be either protected or public

Quiz Start Time: 07:13 PM  Time Left  81

sec(s)

A variable declared as static in a class is a/an _________

Select correct option:

Instance variable

  • Class variable

Const variable

Global variable

 

Which of the following stream read/write data in the form of bytes?

FileReader

FileWriter

PrintWriter

  • FileInputStream

 

HahMap takes key as a/an _________

  • Object

Array

Primitive value

Function

 

Which of the following feature is not available in java

Pointers

Operator overloading

Global variables

  • All of given options

 

Static methods can only access __________

Instance variables

Instance methods

  • Static variables and methods

Both static and instance members

 

What will happen if we write static public void instead of public static void?

Select correct option:

Program does not compile

Program compiles but does not run

  • Program compiles and run successfully

Program throws an exception

 

Which of the following method is called only once during life cycle of Servlet

Service()

  • Init()

Destroy()

Start()

Which of the following method allows any other thread of same priority to execute?

Sleep()

Wait()

Notify()

  • Yield()

 

 

Which of the following problem occurs with lower priority threads?

Race Condition

  • Starvation

Average waiting time

Process Death

 

Which of the following method is used to convert a string into an int value?

IntValue()

parselnt()

  • Parselnt()

parselInteger()

 

The classes which contain the word _____ are bytes oriented streams.

Reader

Writer

  • Stream

Byte

 

 

To compare the valueof two strings, _______ must be used.

=operator

==operator

  • Equal()method

Compare()method

 

Which of the following stream is a Node stream?

PrintWriter

FileWriter

  • BufferedReader

All of the given option

 

The given line of code will results in ___________ system.out.println(5+9);

59

5+9

  • 14

syntax error

 

Which of the following feature provides the facility for multiple inheritance

Adapter Classes

Wrapper Classes

  • Interfaces

Collections

 

==operator compares ____________ of strings whereas equals() method compares ______ of the string.

Value, Addresses

  • Address, Values

Size, Addresses

Addresses, Size

 

Which of the following package needs to be import while handling files?

Java.util

  • Java.io

Java.awt

Javas.swing

 

 

Which of the following command is used to run java program?

Java filename.java

  • Java filename

Javac filename.java

Javac filename

 

What will happen if we write static public void instead of public static void?

Program does not compile

Program compiles but does not run

Program compiles and run successfully

  • Program throws an exception

 

Which of the following syntax used to attach an input stream to console?

FileReader fr=new FileReader((input.txt))

FileReader fr=new FileRead(FileDescriptor.in);

  • FileReader fr=new FileReader(FileDescriptor);

 

Is it possible to provide more than one main method within same class?

True

  • False

 

 

 

Which of the following is true about abstract class?

  • An abstract class must have all methods declared as abstract methods.

A class must have at least one abstract method to be abstract class.

A class without any abstract method can be declared as abstract class.

An instance of abstract class can be created

If a super class method is protected then overriding method _________ 

Select correct option: 

 

 must be protected

  • must be public

 must be private

may be either protected or public

 

Which of the following exception belongs to a category of un-checked exception? 

Select correct option: 

 

 IOException

  • Null Pointer exception

 AWTException

 ClassNotFoundException

 

Which of the following is called ' pure abstract class ' ?

Concrete class

Wrapper class

  • Interface

Abstract class with no abstract method

 

Which of the following is true about abstract class?

An abstract class must have all methods declared as abstract methods.

A class must have at least one abstract method to be an abstract class.

  • A class without any abstract method can be declared as abstract class.

An instance of abstract class can be created.

 

Which of the following stream is a filter stream?

 

FileWriter

FileReader

  • BufferedReader

All of given options

 

The classes which contain the word _____ are byte oriented streams.

Reader

Writer

  • Stream

Byte

 

Which of the following stream read/write data in the form of bytes?

ileReader

FileWriter

PrintWriter

  • FileInputStream

 

An instance of abstract class cannot be created.

TRUE

FALSE

 

An abstract class ---------------instantiated.

  • Cannot be

Can be

Must

None of these

 

The relationship between class and interface is called ________

  • ' Is a ' relationship

' Has a ' relationship

' Responds to ' relationship

None of the given options

 

Which of the following belongs to a category of checked exception?

Null Pointer exception

  • IOException

Array index out of bounds

NumberFormatException

 

Which of the following exception belongs to a category of un-checked exception?

IOException

  • Null Pointer exception

AWTException

ClassNotFoundException

 

All the exceptions and errors in java are inherited from _____ class.

Exception

Error

  • Throwable

 IOException

 

Exceptions must be handled while handling files otherwise it may lead to _____

Logical error

Syntax error

  • Run-time error

No error

 

Which of the following package needs to be import while handling files?

java.util

  • java.io

java.awt

javax.swing

 

When defining a method you must include a/an ....... to declare any exception that

might be thrown but is not caught in the method:

try block

finally block

catch block

  • throws clause

 

A top level class may have only the following access modifier.

Package

Private

Protected

  • Public

 

Which of the following is used for inheritance in java?

implements

  • extends

: (colon)

inherit

 

A collection can store ..........

  • Homogenous objects

Heterogeneous objects

 

Which of the following syntax is used to attach an input stream to console ?

  • FileReader fr = new FileReader(' input.txt ') ;

FileReader fr = new FileReader(FileDescriptor.in);

FileReader fr = new FileReader(FileDescriptor);

FileReader fr = new FileReader(console);

 

 

 

Window frame and dialog use ________ as their default layout.

  • Border layout

Flow layout

GridBag layout

Grid layout

 

There are _________ types of exceptions in Java

2

  • 3

4

5

What if the main method is declared as private?

The program does not compile

The program compiles but does not run

  • The program compiles and runs properly

The program throws an exception on compile time

 

Java program code is compiled into form called

Machine code

native Code

  • Byte Code

Source Code

 

A top level class without any modifier is accessible to

any class

  • any class within the same package

any class within the same file

any subclass of this class

 

Overloading is _______ whereas overriding is _____

Run time binding, compile time binding

Late binding, compile time binding

  • Compile time binding, run time binding

Run time binding, late time binding

 

Static methods only access ___

instance variable

instance method

  • static variables and methods

both static and instance members

 Which of the following is modifier is provided by default if no access is written explicitly?

public

Private

Protected

  • Default

 

 

HahMap takes key as a/an _________

  • Object

Array

Primitive value

Function 

RSS

Latest Activity

Today Top Members 

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service