CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY JAVA

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

1.Which four options describe the correct default values for array elements of the types indicated?

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

Core JAVA Training Syllabus FEE: RS. 8000/-

Class, Variable, Constructor, Object, Method Questions

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

15CS45 : OBJECT ORIENTED CONCEPTS

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

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

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.

Chapter 4 Java Language Fundamentals

Chapter 1 Introduction to Java

Tutorial 8 Date: 15/04/2014

BIT Java Programming. Sem 1 Session 2011/12. Chapter 2 JAVA. basic

CSC 1214: Object-Oriented Programming

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

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)

An overview of Java, Data types and variables

Introduction to Programming Using Java (98-388)

1 Shyam sir JAVA Notes

JAVA MOCK TEST JAVA MOCK TEST III

Index COPYRIGHTED MATERIAL

CS260 Intro to Java & Android 03.Java Language Basics

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

Class Libraries and Packages

2 rd class Department of Programming. OOP with Java Programming

Class definition. complete definition. public public class abstract no instance can be created final class cannot be extended

Java language. Part 1. Java fundamentals. Yevhen Berkunskyi, NUoS

STRUCTURING OF PROGRAM

Character Stream : It provides a convenient means for handling input and output of characters.

GlobalLogic Technical Question Paper

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

Modern Programming Languages. Lecture Java Programming Language. An Introduction

Java Primer. CITS2200 Data Structures and Algorithms. Topic 2

public class Test { static int age; public static void main (String args []) { age = age + 1; System.out.println("The age is " + age); }

Language Features. 1. The primitive types int, double, and boolean are part of the AP

Building Java Programs. Introduction to Programming and Simple Java Programs

Compaq Interview Questions And Answers

CSC Java Programming, Fall Java Data Types and Control Constructs

Points To Remember for SCJP

Administrivia. Java Review. Objects and Variables. Demo. Example. Example: Assignments

Full file at Chapter 2 - Inheritance and Exception Handling

COMP 202 Java in one week

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Fundamentals of Object Oriented Programming

Unit 4 - Inheritance, Packages & Interfaces

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

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

The Java Series. Java Essentials Advanced Language Constructs. Java Essentials II. Advanced Language Constructs Slide 1

Programming overview

A- Core Java Audience Prerequisites Approach Objectives 1. Introduction

: Primitive data types Variables Operators if, if-else do-while, while, for. // // First Java Program. public class Hello {

Selected Questions from by Nageshwara Rao

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?

3. Java - Language Constructs I

A Quick Tour p. 1 Getting Started p. 1 Variables p. 3 Comments in Code p. 6 Named Constants p. 6 Unicode Characters p. 8 Flow of Control p.

Core Java SYLLABUS COVERAGE SYLLABUS IN DETAILS

Program Fundamentals

Computer Components. Software{ User Programs. Operating System. Hardware

Java: framework overview and in-the-small features

Core Java - SCJP. Q2Technologies, Rajajinagar. Course content

Java Programming Training for Experienced Programmers (5 Days)

S.E. Sem. III [CMPN] Object Oriented Programming Methodology

Introduction. Assessment Test. Part I The Programmer s Exam 1

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

Computer Components. Software{ User Programs. Operating System. Hardware

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java

Note: Answer any five questions. Sun micro system officially describes java with a list of buzz words

Midterm assessment - MAKEUP Fall 2010

Crash Course in Java. Why Java? Java notes for C++ programmers. Network Programming in Java is very different than in C/C++

What is a thread anyway?

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

20 Most Important Java Programming Interview Questions. Powered by

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

Operators and Expressions

Assignment No 1. Sanjivani Rural Education Society s KBP Polytechnic, Kopargaon. HOD [ Prof. A. R. Mirikar ] Subject Teacher [Prof. H.E.

A web-based IDE for Java

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

I pledge by honor that I will not discuss this exam with anyone until my instructor reviews the exam in the class.

CompSci 125 Lecture 02

Some Interview Question-Answers on Java JAVA. dfghjklzxcvbnmqwertyuiopasdfghjklzx 1/10/2013. cvbnmqwertyuiopasdfghjklzxcvbnmq.

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- MARCH, 2012 OOP THROUGH JAVA (Common to CT, CM and IF)

PESIT Bangalore South Campus

CMSC 331 Second Midterm Exam

The Java programming environment. The Java programming environment. Java: A tiny intro. Java features

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

Std 12 Lesson-10 Exception Handling in Java ( 1

F1 A Java program. Ch 1 in PPIJ. Introduction to the course. The computer and its workings The algorithm concept

Java Overview An introduction to the Java Programming Language

Training topic: OCPJP (Oracle certified professional Java programmer) or SCJP (Sun certified Java programmer) Content and Objectives

Selected Java Topics

Answer1. Features of Java

Multitasking Multitasking allows several activities to occur concurrently on the computer. A distinction is usually made between: Process-based multit

Games Course, summer Introduction to Java. Frédéric Haziza

Full file at

(A Woefully Incomplete) Introduction To Java. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 11 10/02/2012

CS506 Web Design & Development Final Term Solved MCQs with Reference

Programming II (CS300)

UCLA PIC 20A Java Programming

Transcription:

1. JIT meaning a. java in time b. just in time c. join in time d. none of above CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY JAVA 2. After the compilation of the java source code, which file is created by the JVM a..class b..java c..cdr d..doc 3. JAR file contains the compressed version of a..java file b..class file c..jsp file 4. What is meaning of jar a. java archived b. java array c. java architecture d. none of these 5. What do you mean by javap a. java compiler b. java Interpreter c. java Disassemble d. java debugger 6. What is jdb a. java compiler b. java Interpreter c. java Disassemble d. java debugger 7. Process of creating exact copy of the existing object is called a. cloning b. overloading c. overriding d. coping 8. Which is the predefined package a. lang package b. io package c. util package d. All of above 9. Object which can store group of other objects is called a. Collection object b. Java object c. Package d. Wrapper 10. All collection classes are available in a. java.io package b. java.lang package c. java.awt package d. java.util package

11. String is the predefined a. Method b. Class c. Variable d. Object 12. Super is the predefined a. Keyword b. Method c. Keyword and Method 13. Execution of the program is always begins with a. Main method b. class contain main method c. parent class d. default package 14. Converting a primitive type data into its corresponding wrapper class object instance is called a. boxing b. wrapping c. instantiation d. autoboxing 15. Which class cannot be a subclass in java? a. abstract class b. parent class c. Final class 16. Can we declare abstract static method? a. Yes b. No 17. In java, gc() method is available in which package a. java.lang package b. java.util package c. java.awt package d. java.io package 18. Inheritance means a. Sub class extends super class b. Sub class extends Base class c. Sub class create object of super class d. All of the above 19. Interfaces helps in which type of inheritance a. Multiple inheritance b. Multilevel inheritance c. Hierarchical inheritance 20. Which method of java is invoked by JVM to reclaim the inaccessible memory location a. reclaim() method b. final() method c. finalize() method d. both b and c 21. Applet always executed on a. Client side b. Server Side

22. Which method of the Applet class displays the result of applet code on screen a. run() method b. paint() method c. drawstring() method d. main() method 23. Which keyword represents object of the present class a. interface b. package c. this d. static 24. Which method can't be overidden a. super b. static c. final d. println 25. Main method parameter has which type of data type a. int b. char c. string d. double 26. Which one of these lists contains only Java programming language keywords? a. class, if, void, long, Int, continue b. default, native, goto, instanceof, finally, throws c. try, virtual, throw, final, volatile, transient d. strictfp, constant, super, implements, do e. byte, break, assert, switch, include 27. public interface Foo int k = 4; /* Line 3 */ Which three piece of codes are equivalent to line 3? 1. final int k = 4; 2. public int k = 4; 3. static int k = 4; 4. abstract int k = 4; 5. volatile int k = 4; 6. protected int k = 4; A. 1, 2 and 3 B. 2, 3 and 4 C. 3, 4 and 5 D. 4, 5 and 6 28. Which one of the following will declare an array and initialize it with five numbers? A. Array a = new Array(5); B. int [] a = 23,22,21,20,19; C. int a [] = new int[5]; D. int [5] array; 29. Which is the valid declarations within an interface definition? A. public double methoda(); B. public final double methoda(); C. static void methoda(double d1); D. protected void methoda(double d1);

30. Which one creates an instance of an array? A. int[ ] ia = new int[15]; B. float fa = new float[20]; C. char[ ] ca = "Some String"; D. int ia[ ] [ ] = 4, 5, 6, 1,2,3 ; 31. Which two cause a compiler error? 1. float[ ] f = new float(3); 2. float f2[ ] = new float[ ]; 3. float[ ]f1 = new float[3]; 4. float f3[ ] = new float[3]; 5. float f5[ ] = 1.0f, 2.0f, 2.0f; A.2, 4 B. 3, 5 C. 4, 5 D. 1, 2 32. Given a method in a protected class, what access modifier do you use to restrict access to that method to only the other members of the same class? A.final B. static C. private D. protected E. volatile 33. Which class does not override the equals() and hashcode() methods, inheriting them directly from class Object? A.java.lang.String B. java.lang.double C. java.lang.stringbuffer D. java.lang.character 34. /* Missing Statement? */ public class foo public static void main(string[]args)throws Exception java.io.printwriter out = new java.io.printwriter(); new java.io.outputstreamwriter(system.out,true); out.println("hello"); What line of code should replace the missing statement to make this program compile? A. No statement required. B. import java.io.*; C. include java.io.*; D. import java.io.printwriter; 35. Which of the following are Java reserved words? 1. run 2. import 3. default 4. implement A.1 and 2 B. 2 and 3 C. 3 and 4 D. 2 and 4 36. What allows the programmer to destroy an object x? A. x.delete() B. x.finalize() C. Runtime.getRuntime().gc() D. Only the garbage collection system can destroy an object.

37. class X implements Runnable public static void main(string args[]) /* Missing code? */ public void run() Which of the following line of code is suitable to start a thread? A. Thread t = new Thread(X); B. Thread t = new Thread(X); t.start(); C. X run = new X(); Thread t = new Thread(run); t.start(); D. Thread t = new Thread(); x.run(); 38. Which cannot directly cause a thread to stop executing? A. Calling the SetPriority() method on a Thread object. B. Calling the wait() method on an object. C. Calling notify() method on an object. D. Calling read() method on an InputStream object. 39. Which of the following will directly stop the execution of a Thread? A.wait() B. notify() C. notifyall() D. exits synchronized code 40. What will be the output of the program? public class Foo public static void main(string[] args) try return; finally System.out.println( "Finally" ); A. Finally B. Compilation fails. C. The code runs with no output. D. An exception is thrown at runtime. 41. What will be the output of the program? try int x = 0; int y = 5 / x; catch (Exception e) System.out.println("Exception"); catch (ArithmeticException ae) System.out.println(" Arithmetic Exception"); System.out.println("finished");

A.finished B. Exception C. Compilation fails. D. Arithmetic Exception 42. Which is a reserved word in the Java programming language? A.method B. native C. subclasses D. reference E. array 43. Which three are valid declarations of a char? 1. char c1 = 064770; 2. char c2 = 'face'; 3. char c3 = 0xbeef; 4. char c4 = \u0022; 5. char c5 = '\iface'; 6. char c6 = '\uface'; A. 1, 2, 4 B. 1, 3, 6 C. 3, 5 D. 5 only 44. What will be the output of the program? public class CommandArgs public static void main(string [] args) String s1 = args[1]; String s2 = args[2]; String s3 = args[3]; String s4 = args[4]; System.out.print(" args[2] = " + s2); and the command-line invocation is > java CommandArgs 1 2 3 4 A. args[2] = 2 B. args[2] = 3 C. args[2] = null D. An exception is thrown at runtime. 45. public class While public void loop() int x= 0; while ( 1 ) /* Line 6 */ System.out.print("x plus one is " + (x + 1)); /* Line 8 */ Which statement is true? A. There is a syntax error on line 1. B. There are syntax errors on lines 1 and 6. C. There are syntax errors on lines 1, 6, and 8. D. There is a syntax error on line 6.

46. What will be the output of the program? int i = l, j = -1; switch (i) case 0, 1: j = 1; /* Line 4 */ case 2: j = 2; default: j = 0; System.out.println("j = " + j); A.j = -1 B. j = 0 C. j = 1 D. Compilation fails. 47. What will be the output of the program? int i = 1, j = 10; do if(i > j) break; j--; while (++i < 5); System.out.println("i = " + i + " and j = " + j); A.i = 6 and j = 5 B. i = 5 and j = 5 C. i = 6 and j = 4 D. i = 5 and j = 6 48. What will be the output of the program? int x = l, y = 6; while (y--) x++; System.out.println("x = " + x +" y = " + y); A.x = 6 y = 0 B. x = 7 y = 0 C. x = 6 y = -1 D. Compilation fails. 49. What will be the output of the program? for (int i = 0; i < 4; i += 2) System.out.print(i + " "); System.out.println(i); /* Line 5 */ A.0 2 4 B. 0 2 4 5 C. 0 1 2 3 4 D. Compilation fails. 50. What will be the output of the program? int I = 0; label: if (I < 2) System.out.print("I is " + I); I++; continue label; A. I is 0 B. I is 0 I is 1 C. Compilation fails. D. None of the above