Come & Join Us at VUSTUDENTS.net

Similar documents
Virtualians.ning.pk. 2 - Java program code is compiled into form called 1. Machine code 2. native Code 3. Byte Code (From Lectuer # 2) 4.

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

ddfffddd CS506 FINAL TERMS SOLVED BY MCQS GHAZAL FROM IEMS CAMPUS SMD CS506 Mcqs file solved by ghazal

CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1

CS506 Web Design & Development Final Term Solved MCQs with Reference

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR (ODD SEM)

First Name: AITI 2004: Exam 2 July 19, 2004

Lecture 5: Java Graphics

VALLIAMMAI ENGINEERING COLLEGE

I/O Framework and Case Study. CS151 Chris Pollett Nov. 2, 2005.

CONTENTS. Chapter 1 Getting Started with Java SE 6 1. Chapter 2 Exploring Variables, Data Types, Operators and Arrays 13

Packages: Putting Classes Together

Core Java Contents. Duration: 25 Hours (1 Month)

SCHEME OF COURSE WORK

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1

First Name: AITI 2004: Exam 2 July 19, 2004

Lecture 3: Java Graphics & Events

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries

Complete Java Contents

CS 251 Intermediate Programming Java I/O Streams

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5

JAVA. Duration: 2 Months

Contents Chapter 1 Introduction to Programming and the Java Language

Welcome to CIS 068! 1. GUIs: JAVA Swing 2. (Streams and Files we ll not cover this in this semester, just a review) CIS 068

Graphical User Interfaces (GUIs)

Lab & Assignment 1. Lecture 3: ArrayList & Standard Java Graphics. Random Number Generator. Read Lab & Assignment Before Lab Wednesday!

Contents. iii Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. Enterprise Services August 1998, Revision B

Introduction to the JAVA UI classes Advanced HCI IAT351

Java for Non Majors. Final Study Guide. April 26, You will have an opportunity to earn 20 extra credit points.

15CS45 : OBJECT ORIENTED CONCEPTS

Unit 7: Event driven programming

Supporting Materials

Command-Line Applications. GUI Libraries GUI-related classes are defined primarily in the java.awt and the javax.swing packages.

Multiple Choice Questions: Identify the choice that best completes the statement or answers the question. (15 marks)


CS 11 java track: lecture 3

Core JAVA Training Syllabus FEE: RS. 8000/-

Core Java SYLLABUS COVERAGE SYLLABUS IN DETAILS

Programmierpraktikum

CS 180 Final Exam Review 12/(11, 12)/08

Compaq Interview Questions And Answers

PESIT Bangalore South Campus

Table of Contents. Chapter 1 Getting Started with Java SE 7 1. Chapter 2 Exploring Class Members in Java 15. iii. Introduction of Java SE 7...

GUI DYNAMICS Lecture July 26 CS2110 Summer 2011

Name Section. CS 21a Introduction to Computing I 1 st Semester Final Exam

Come & Join Us at VUSTUDENTS.net

Control Flow: Overview CSE3461. An Example of Sequential Control. Control Flow: Revisited. Control Flow Paradigms: Reacting to the User

CSCE3193: Programming Paradigms

Java Programming Lecture 6

PROGRAMMING DESIGN USING JAVA (ITT 303) Unit 7

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA

Data Source Name (Page 150) Ref: - After creating database, you have to setup a system Data Source Name (DSN).

+! Today. Lecture 3: ArrayList & Standard Java Graphics 1/26/14! n Reading. n Objectives. n Reminders. n Standard Java Graphics (on course webpage)

Midterm assessment - MAKEUP Fall 2010

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7)

Java for Interfaces and Networks (DT3010, HT10)

Instruction to students:

M257 Past Paper Oct 2007 Attempted Solution

GUI Basics. Object Orientated Programming in Java. Benjamin Kenwright

Introduction This assignment will ask that you write a simple graphical user interface (GUI).

OOP Assignment V. For example, the scrolling text (moving banner) problem without a thread looks like:

Java & Graphical User Interface II. Wang Yang wyang AT njnet.edu.cn

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

(Objective-CS506 Web Design and Development)

CS11 Java. Fall Lecture 3

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Graphical User Interfaces 2

5. In JAVA, is exception handling implicit or explicit or both. Explain with the help of example java programs. [16]

The AWT Event Model 9

Page 1

Java Intro 3. Java Intro 3. Class Libraries and the Java API. Outline

CS 251 Intermediate Programming GUIs: Components and Layout

Object-oriented programming in Java (2)

Sri Vidya College of Engineering & Technology Question Bank

GUI Program Organization. Sequential vs. Event-driven Programming. Sequential Programming. Outline

CMSC 331 Second Midterm Exam

BASICS OF GRAPHICAL APPS

Java Programming. Price $ (inc GST)

11/7/12. Discussion of Roulette Assignment. Objectives. Compiler s Names of Classes. GUI Review. Window Events

Input, Output and Exceptions. COMS W1007 Introduction to Computer Science. Christopher Conway 24 June 2003

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started

Java Graphical User Interfaces AWT (Abstract Window Toolkit) & Swing

Starting Out with Java: From Control Structures Through Objects Sixth Edition

G51PRG: Introduction to Programming Second semester Applets and graphics

Chapter 12. File Input and Output. CS180-Recitation

CSCI 136 Written Exam #1 Fundamentals of Computer Science II Spring 2015

SD Module-1 Advanced JAVA

1 OBJECT-ORIENTED PROGRAMMING 1

SD Module-1 Advanced JAVA. Assignment No. 4

Example Programs. COSC 3461 User Interfaces. GUI Program Organization. Outline. DemoHelloWorld.java DemoHelloWorld2.java DemoSwing.

Events and Exceptions

1. (5 points) In your own words, describe what an instance is.

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

CS11 Java. Fall Lecture 4

2. (True/False) All methods in an interface must be declared public.

Review sheet for Final Exam (List of objectives for this course)

E Oracle 10g Java Bootcamp I v1

Introduction Unit 4: Input, output and exceptions

Java SE 8 Programmer I and II Syballus( Paper codes : 1z0-808 & 1z0-809)

Oracle 10g: Java Programming

Transcription:

Come & Join Us at VUSTUDENTS.net For Assignment Solution, GDB, Online Quizzes, Helping Study material, Past Solved Papers, Solved MCQs, Current Papers, E-Books & more. Go to http://www.vustudents.net and click Sing up to register. VUSTUENTS.NET is a community formed to overcome the disadvantages of distant learning and virtual environment, where pupils don t have any formal contact with their mentors, This community provides its members with the solution to current as well as the past Assignments, Quizzes, GDBs, and Papers. This community also facilitates its members in resolving the issues regarding subject and university matters, by providing text e-books, notes, and helpful conversations in chat room as well as study groups. Only members are privileged with the right to access all the material, so if you are not a member yet, kindly SIGN UP to get access to the resources of VUSTUDENTS.NET»» Regards»» VUSTUDENTS.NET TEAM. Virtual University of Pakistan

CS506 Web Design & Development Prepared By : M Atif Ali, Aroosa Naz, Nadia Wajid, Mohsin Munir Exam Term : Mid Total MCQS : 57 page 1 / 11

1 - What if the main method is declared as private? 1. The program does not compile 2. The program compiles but does not run 3. The program compiles and runs properly 4. The program throws an exception on compile time Correct Choice : 3 From Lectuer # 2 2 - Java program code is compiled into form called 1. Machine code 2. native Code 3. Byte Code 4. Source Code Correct Choice : 3 From Lectuer # 2 3 - A top level class without any modifier is accessible to 1. any class 2. any class within the same package 3. any class within the same file 4. any subclass of this class Correct Choice : 2 From Lectuer # 4 4 - Overloading is whereas overriding is 1. Run time binding, compile time binding 2. Late binding, compile time binding 3. Compile time binding, run time binding 4. Run time binding, late time binding Correct Choice : 3 From Lectuer # 4 5 - Static methods only access 1. instance variable 2. instance method 3. static variables and methods 4. both static and instance members Correct Choice : 3 From Lectuer # 4 6 - Which of the following is modifier is provided by default if no access is written explicitly? 1. public 2. Private 3. Protected 4. Default Correct Choice : 4 From Lectuer # 4 page 2 / 11

7 - A top level class may have only the following access modifier. 1. Package 2. Private 3. Protected 4. Public Correct Choice : 4 From Lectuer # 4 8 - Which of the following is used for inheritance in java? 1. implements 2. extends 3. : (colon) 4. inherit Correct Choice : 2 From Lectuer # 5 9 - A collection can store... 1. Homogenous objects 2. Heterogeneous objects 3. Objects as well as primitive values 4. At most 100 objects Correct Choice : 1 From Lectuer # 6 10 - Window frame and dialog use as their default layout. 1. Border layout 2. Flow layout 3. GridBag layout 4. Grid layout Correct Choice : 1 From Lectuer # 7 11 - There are types of exceptions in Java 1. 2 2. 3 3. 4 4. 5 Correct Choice : 2 From Lectuer # 7 12 - Which of the following belongs to a category of checked exception? 1. Null Pointer exception 2. IOException 3. Array index out of bounds 4. NumberFormatException Correct Choice : 2 From Lectuer # 7 page 3 / 11

13 - Which of the following exception belongs to a category of un-checked exception? 1. IOException 2. Null Pointer exception 3. AWTException 4. ClassNotFoundException Correct Choice : 2 From Lectuer # 7 14 - All the exceptions and errors in java are inherited from class. 1. Exception 2. Error 3. Throwable 4. IOException Correct Choice : 3 From Lectuer # 7 15 - Exceptions must be handled while handling files otherwise it may lead to 1. Logical error 2. Syntax error 3. Run-time error 4. No error Correct Choice : 3 From Lectuer # 7 16 - Which of the following package needs to be import while handling files? 1. java.util 2. java.io 3. java.awt 4. javax.swing Correct Choice : 2 From Lectuer # 7 17 - When defining a method you must include a/an... to declare any exception that might be thrown but is not caught in the method: 1. try block 2. finally block 3. catch block 4. throws clause Correct Choice : 4 From Lectuer # 7 18 - Which of the following syntax is used to attach an input stream to console? 1. FileReader fr = new FileReader(' input.txt ') ; 2. FileReader fr = new FileReader(FileDescriptor.in); 3. FileReader fr = new FileReader(FileDescriptor); 4. FileReader fr = new FileReader(console); page 4 / 11

Correct Choice : 1 From Lectuer # 7 19 - The classes which contain the word are byte oriented streams. 1. Reader 2. Writer 3. Stream 4. Byte Correct Choice : 3 From Lectuer # 8 20 - Which of the following stream read/write data in the form of bytes? 1. FileReader 2. FileWriter 3. PrintWriter 4. FileInputStream Correct Choice : 4 From Lectuer # 8 21 - Which of the following is called ' pure abstract class '? 1. Concrete class 2. Wrapper class 3. Interface 4. Abstract class with no abstract method Correct Choice : 3 From Lectuer # 9 22 - Which of the following is called ' pure abstract class '? 1. Concrete class 2. Wrapper class 3. Interface 4. Abstract class with no abstract method Correct Choice : 3 From Lectuer # 9 23 - Which of the following is true about abstract class? 1. An abstract class must have all methods declared as abstract methods. 2. A class must have at least one abstract method to be an abstract class. 3. A class without any abstract method can be declared as abstract class. 4. An instance of abstract class can be created. Correct Choice : 3 From Lectuer # 9 24 - Which of the following stream is a filter stream? 1. FileWriter 2. FileReader 3. BufferedReader 4. All of given options page 5 / 11

Correct Choice : 3 From Lectuer # 9 25 - An instance of abstract class cannot be created. 1. TRUE 2. FALSE 3. 4. Correct Choice : 1 From Lectuer # 9 26 - Anabstractclass ---------------instantiated. 1. Cannot be 2. Can be 3. Must 4. None of these Correct Choice : 1 From Lectuer # 9 27 - The relationship between class and interface is called 1. ' Is a ' relationship 2. ' Has a ' relationship 3. ' Responds to ' relationship 4. None of the given options Correct Choice : 1 From Lectuer # 9 28 - BorderLayout is the default layout manager for a JFrame content pane 1. TRUE 2. FALSE 3. 4. Correct Choice : 2 From Lectuer # 10 29 - Which of the following is a general purpose container? 1. JFrame 2. Dialog 3. JPanel 4. JApplet Correct Choice : 3 From Lectuer # 10 30 - Border layout divides the area into regions 1. 3 2. 4 3. 5 4. 6 page 6 / 11

Correct Choice : 5 From Lectuer # 10 31 - JPanel and Applet use as their default layout. 1. Flow layout 2. Border layout 3. Grid layout 4. GridBag layout Correct Choice : 1 From Lectuer # 10 32 - Which of the following is true about AWT and SWING components? 1. AWT components creates a process whereas SWING component creates a thread. 2. AWT components creates a thread whereas SWING component creates a process. 3. Both AWT and SWING component creates a process. 4. Both AWT and SWING component creates a thread. Correct Choice : 1 From Lectuer # 10 33 - Which of the following function will be used to register event handler with events generator (button)? 1. addaction() 2. addactionlistener() 3. addlistener() 4. registerlistener() Correct Choice : 2 From Lectuer # 11 34 - Event source can have --------- listeners registered on it. 1. Single 2. Double 3. Triple 4. Multiple Correct Choice : 4 From Lectuer # 11 35 - If a class needs to handle events generated by button then which of the following interface a class needs to implement? 1. ComponentListener 2. KeyListener 3. MouseListener 4. ActionListener Correct Choice : 4 From Lectuer # 11 36 - Which of the following function is declared in MouseMotionListener interface? page 7 / 11

1. public void mousepressed (MouseEvent me); 2. public void mousedragged (MouseEvent me); 3. public void mouseclicked (MouseEvent me); 4. public void mouseentered (MouseEvent me); Correct Choice : 2 From Lectuer # 12 37 - WindowListener interface contains methods. 1. Four 2. Six 3. Seven 4. Eight Correct Choice : 3 From Lectuer # 12 38 - Mouse events can be trapped for GUI component. 1. JPanel 2. JFrame 3. JButton 4. All of given Correct Choice : 4 From Lectuer # 12 39 - Adapter classes have been defined for listener interfaces except interface. 1. MouseListener 2. KeyListener 3. WindowListener 4. ActionListener Correct Choice : 4 From Lectuer # 13 40 - Which of the following package needs to import while interacting with relational database? 1. java.io 2. java.sql 3. javax.swing 4. java.awt Correct Choice : 2 From Lectuer # 14 41 - DSN stands for 1. Data System Name 2. Domain system Name 3. Data Source Name 4. Database System Name Correct Choice : 3 From Lectuer # 14 42 - Which of the following method is used to execute SELECT SQL statements? page 8 / 11

1. executeupdate(sql); 2. ExecuteUpdate(sql); 3. executequery(sql); 4. ExecuteQuery(sql); Correct Choice : 3 From Lectuer # 14 43 - CREATE, ALTER, DROP are SQL statements. 1. DML 2. DDL 3. DCL 4. None of given Correct Choice : 2 From Lectuer # 15 44 - Which of the following method is used to execute INSERT, UPDATE and Delete SQL statements? 1. executequery(sql); 2. ExecuteQuery(sql); 3. executeupdate(sql); 4. ExecuteUpdate(sql); Correct Choice : 3 From Lectuer # 15 45 - Which of the following statement object is used to execute stored procedures? 1. Statement 2. PreparedStatement 3. CallableStatement 4. None of given options Correct Choice : 3 From Lectuer # 15 46 - HahMap takes key as a/an 1. Object 2. Array 3. Primitive value 4. Function Correct Choice : 1 From Lectuer # 16 47 - A...defines the way and method of communication between two parties 1. Compiler 2. Protocol 3. Tool 4. Technique Correct Choice : 2 From Lectuer # 17 48 - To create DataBaseMetaData object we write following line of code page 9 / 11

1. DataBaseMetaData db = con.getmeatadata(); 2. ResultSetMetaData rsmd = rs.getmetadata(); 3. ResultSetMetaData rsmd = rs.setmetadata(); 4. DataBaseMetaData db = con.setmeatadata(); Correct Choice : 1 From Lectuer # 17 49 - Which of the following are passed as an argument to the paint () method: 1. A Canvas object- 2. A Graphics object- 3. An Image object- 4. A paint object- Correct Choice : 2 From Lectuer # 18 50 - The code below draws a line. What color is the line?g.setcolor(color.red.green.yellow.red);g.drawline(0, 0, 100,100); 1. Red 2. Green 3. Yellow 4. Black Correct Choice : 4 From Lectuer # 18 51 - Which of the following methods are invoked by the AWT to support paint and repaint operations? 1. paint( ) 2. repaint( ) 3. draw( ) 4. redraw( ) Correct Choice : 1 From Lectuer # 19 52 - If a super class method is protected then overriding method 1. must be protected 2. must be public 3. must be private 4. may be either protected or public Correct Choice : 2 From Lectuer # 20 53 - Socket is a --------------communication channel between hosts. 1. Uni-directional 2. Bi-directional 3. Multi-directional 4. None of these Correct Choice : 2 From Lectuer # 21 page 10 / 11

Powered by TCPDF (www.tcpdf.org) 54 - You can ---------to a network using sockets. 1. Read 2. Write 3. Read/Write 4. None of these Correct Choice : 3 From Lectuer # 22 55 - A serializable class must implement the method(s)... 1. readobject and writeobject 2. Either readobject or writeobject, or both, depending upon the desired behavior 3. No need to implement any method: 4. None of the given option Correct Choice : 3 From Lectuer # 22 56 - Aside from the Scanner class, which of the following class/es can be used for text file file input 1. ObjectInputStream 2. BufferedReader 3. StringTokenizer 4. None of these Correct Choice : 1 From Lectuer # 22 page 11 / 11