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

Similar documents
B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA

CS/B.TECH/CSE(New)/SEM-5/CS-504D/ OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 GROUP A. (Multiple Choice Type Question)

15CS45 : OBJECT ORIENTED CONCEPTS

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

SCHEME OF COURSE WORK

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

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

Core JAVA Training Syllabus FEE: RS. 8000/-

CS/B.TECH/CSE(OLD)/SEM-6/CS-605/2012 OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

PESIT Bangalore South Campus

Java Fundamentals p. 1 The Origins of Java p. 2 How Java Relates to C and C++ p. 3 How Java Relates to C# p. 4 Java's Contribution to the Internet p.

Compaq Interview Questions And Answers

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

M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

OBJECT ORIENTED PROGRAMMING TYm. Allotted : 3 Hours Full Marks: 70

CMSC 331 Second Midterm Exam

Programming overview

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

Time : 3 hours. Full Marks : 75. Own words as far as practicable. The questions are of equal value. Answer any five questions.

Name of subject: JAVA PROGRAMMING Subject code: Semester: V ASSIGNMENT 1

JAVA MOCK TEST JAVA MOCK TEST III

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

VALLIAMMAI ENGINEERING COLLEGE

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

SRM INSTITUTE OF SCIENCE & TECHNOLOGY Faculty of Science and Humanities Department of Computer Science UNIT I - INTRODUCTION TO JAVA

Midterm assessment - MAKEUP Fall 2010

1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these. Answer: B

Multithreaded Programming

Core Java Interview Questions and Answers.

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY JAVA

Java Threads. COMP 585 Noteset #2 1

1 Shyam sir JAVA Notes

M3-R3: INTERNET AND WEB PAGE DESIGN

Contents. 6-1 Copyright (c) N. Afshartous

CS Internet programming Unit- I Part - A 1 Define Java. 2. What is a Class? 3. What is an Object? 4. What is an Instance?

M4.1-R4: APPLICATION OF.NET TECHNOLOGY

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

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

Java Interview Questions

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

Unit 4. Thread class & Runnable Interface. Inter Thread Communication

A3-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH 'C' LANGUAGE

Object Oriented Programming with Java. Unit-1

COURSE 11 PROGRAMMING III OOP. JAVA LANGUAGE

Assumptions. History

Java Application Development

1 OBJECT-ORIENTED PROGRAMMING 1

S.No Question Blooms Level Course Outcome UNIT I. Programming Language Syntax and semantics

Chapter 6 Introduction to Defining Classes

CMSC 132: Object-Oriented Programming II

Java 2 Programmer Exam Cram 2

Selected Java Topics

ABOUT CORE JAVA COURSE SCOPE:

CSC Java Programming, Fall Java Data Types and Control Constructs

Quiz on Tuesday April 13. CS 361 Concurrent programming Drexel University Fall 2004 Lecture 4. Java facts and questions. Things to try in Java

Core Java SYLLABUS COVERAGE SYLLABUS IN DETAILS

5/23/2015. Core Java Syllabus. VikRam ShaRma

Govt. of Karnataka, Department of Technical Education Diploma in Information Science & Engineering. Fifth Semester

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

Multithreading Pearson Education, Inc. All rights reserved.

CS 556 Distributed Systems

The Sun s Java Certification and its Possible Role in the Joint Teaching Material

JAVA and J2EE UNIT - 4 Multithreaded Programming And Event Handling

Class, Variable, Constructor, Object, Method Questions

(2½ hours) Total Marks: 75

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

Introduction to Programming Using Java (98-388)

M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

Computation Abstractions. Processes vs. Threads. So, What Is a Thread? CMSC 433 Programming Language Technologies and Paradigms Spring 2007

CIS233J Java Programming II. Threads

SELF-STUDY. Glossary

Final Exam CS 251, Intermediate Programming December 13, 2017

CSCI 201L Written Exam #1 Fall % of course grade

Inheritance. Lecture 11 COP 3252 Summer May 25, 2017

Get Unique study materials from

Concurrent Programming using Threads

Unit III Rupali Sherekar 2017

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

DEPARTMENT OF INFORMATION TECHNOLOGY

M3-R3: INTERNET AND WEB DESIGN

CS-140 Fall 2017 Test 2 Version A Nov. 29, 2017

Declarations and Access Control SCJP tips

Java for Non Majors Spring 2018

Inheritance. Inheritance allows the following two changes in derived class: 1. add new members; 2. override existing (in base class) methods.

CPS221 Lecture: Threads

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

M2-R4: INTERNET TECHNOLOGY AND WEB DESIGN

STRUCTURING OF PROGRAM

Brief Summary of Java

Introduction to Visual Basic and Visual C++ Introduction to Java. JDK Editions. Overview. Lesson 13. Overview

7. MULTITHREDED PROGRAMMING

By: Abhishek Khare (SVIM - INDORE M.P)

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

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

Murach s Beginning Java with Eclipse

CS-140 Fall 2017 Test 1 Version Practice Practice for Nov. 20, Name:

Atelier Java - J1. Marwan Burelle. EPITA Première Année Cycle Ingénieur.

Transcription:

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered in the TEAR-OFF ANSWER SHEET only, attached to the question paper, as per the instructions contained therein. PART ONE is NOT to be answered in the answer book. 3. Maximum time allotted for PART ONE is ONE HOUR. Answer book for PART TWO will be supplied at the table when the answer sheet for PART ONE is returned. However, candidates, who complete PART ONE earlier than one hour, can collect the answer book for PART TWO immediately after handing over the answer sheet for PART ONE. TOTAL TIME: 3 HOURS TOTAL MARKS: 100 (PART ONE 40; PART TWO 60) PART ONE (Answer all the questions) 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the tear-off answer sheet attached to the question paper, following instructions therein. (1 x 10) 1.1 Which of the following is Java keyword? A) external B) implement C) throw D) Integer 1.2 What gets printed when the following program is compiled and run? class test { public static void main (String args[]) { int i; do { i++; } while(i < 0); System.out.println(i); } } A) The program does not compile, as i is not initialized. B) The program compiles but does not run. C) The program compiles and runs but does not print anything. D) The program prints 0. B2.52-R3 Page 1 of 6 January, 2006

1.3 The last statement in a finalize method should always be A) super (finalize) B) super.finalize( ) C) finalize(methodname) D) None of the above 1.4 What gets printed when the following program is compiled and run? public class incr { public static void main (String args[]) { int i, j; i = j = 3; int n = 2 * ++i; int m = 2 * j++; System.out.println(i + " " + j + " " + n + " " + m); }} A) 4 4 8 6 B) 4 4 8 8 C) 4 4 6 6 D) 4 3 8 6 1.5 What is byte code in the context of Java? A) The type of code generated by a Java compiler B) The type of code generated by a Java Virtual Machine C) It is another name for a Java source file D) It is the code written within the instance methods of a class 1.6 Which of the following keyword should be used to make a variable defined in a class accessible only to methods defined in the classes in same package. A) By using the keyword package before the variable. B) By using the keyword private before the variable. C) By using the keyword protected before the variable. D) The variable should not be preceded by any of the above-mentioned keywords. 1.7 Select the one most appropriate answer. What is the purpose of method parseint defined in Integer class? A) The method converts an integer to a String. B) The method is used to convert String to an integer, assuming that the String represents an integer. C) The method is used to convert String to Integer class, assuming that the String represents an integer. D) The method converts the Integer object to a String. B2.52-R3 Page 2 of 6 January, 2006

1.8 What is the default priority of a newly created thread? A) MIN_PRIORITY (which is defined as 1 in the Thread class.) B) NORM_PRIORITY (which is defined as 5 in the Thread class.) C) MAX_PRIORITY (which is defined as 10 in the Thread class.) D) A thread inherits the priority of its parent thread. 1.9 Which one does not have a valueof(string) method A) Integer B) Boolean C) Long D) Short 1.10 Which of the following method is used to initialize the instance variable of a class. A) Class B) Public C) Constructor D) Destructor B2.52-R3 Page 3 of 6 January, 2006

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and ENTER in the tear-off sheet attached to the question paper, following instructions therein. (1 x 10) 2.1 By using a thread class multithreaded program can be created. 2.2 It is possible for two threads to access the same variable or the same method of same object at same time. 2.3 A class that inherits from another class is called a super class and the inherited class is called subclass. 2.4 The size () method determines the number of elements in Vector. 2.5 Classes, which are declared as final, can have at least one subclass derived from it. 2.6 By default classes inherit from the Object class, which is a super class of all classes in the java class hierarchy. 2.7 Initialization can happen only ones in the applets lifetime 2.8 The label s font can be changed using the setfont() method 2.9 A component can have multiple listeners for an event type 2.10 Key events are generated when a user presses or releases a key on the keyboard. 3. Match words and phrases in column X with the closest related meaning/ word(s)/phrase(s) in column Y. Enter your selection in the tear-off answer sheet attached to the question paper, following instructions therein. (1 x 10) X 3.1 To compare two strings to each other A. wrapper class 3.2 The block will execute even whether or not an Exception is thrown is done through B. static method 3.3 It is used for garbage collection C..equals( ) 3.4 addelement( ) is the method of D. do while loop 3.5 The loop that will always be executed once E. main ( ) 3.6 To ensure that resource will be executed by only one Thread at a time 3.7 It is invoked even before a single instance of a Class is created F. finally G. finalize ( ) 3.8 Java applets doesn t have H. Vector class 3.9 Integer class is a member of I. Synchronized 3.10 is used to instantiate the Object J. Constructor K. Destructor L. join( ) Y B2.52-R3 Page 4 of 6 January, 2006

4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list below. Enter your choice in the tear-off answer sheet attached to the question paper, following instructions therein. (1 x 10) A. Applets B. Start() C. JRadioButtons D. Inheritance E. Implements F. throws G. String H. Class I. Bytecode J. Join() K. ActionListener L. Constructor 4.1 Java are java programs, which are specifically made to run in a java enabled web browser. 4.2 The bytecode file created by the Java compiler has a(n) extension. 4.3 The methods used to instantiate the object from a class are called. 4.4 is a mechanism that enables one class to inherit all the behavior and attributes of another class. 4.5 A class can use an interface by using the clause. 4.6 RadioButtons are implemented in swing through the class. 4.7 A special clause called is used in method definition to indicate that a method may possibly throw an exception. 4.8 The control method is used to temporarily stop the execution of the thread. 4.9 The method suspends the current thread until that thread object dies. 4.10 After the method is called, the thread is in a Runnable state. B2.52-R3 Page 5 of 6 January, 2006

PART TWO (Answer any FOUR questions) 5. a) What is the difference between Abstract class and an Interface? b) Explain, write once and run anywhere nature of Java. c) What does the "final" keyword mean in front of a variable, a method and a class? d) What does the "static" keyword mean in front of a variable, a method and a class? e) What is JDBC? What are its drivers? Explain in brief. 6. Write a program using swing and awt to design a digital clock. 7. a) Explain the Dynamic method dispatch with the help of coding. b) Distinguish between packages and interfaces with examples. (5x3) (15) (8+7) 8. a) What do you understand by Inter thread Communication? Explain it. b) Write a program to print factorial numbers. 9. Write short notes on: - a) Proxy servers b) Exception Handling c) Access specifiers public, private, protected d) Applet architecture e) Constructors (5+10) (5x3) B2.52-R3 Page 6 of 6 January, 2006