The document contains a comprehensive set of questions and answers related to Java programming, covering topics such as Java basics, syntax, data types, operators, control statements, object-oriented programming concepts, exception handling, applets, and file I/O. It includes multiple-choice questions, descriptive prompts, and practical coding tasks. The content serves as a study guide or quiz for learners to test their knowledge of Java programming.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
6 views
Java
The document contains a comprehensive set of questions and answers related to Java programming, covering topics such as Java basics, syntax, data types, operators, control statements, object-oriented programming concepts, exception handling, applets, and file I/O. It includes multiple-choice questions, descriptive prompts, and practical coding tasks. The content serves as a study guide or quiz for learners to test their knowledge of Java programming.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7
JAVA PROGRAMMING
1) Java is initially called as
(a) oak (b)java (c)sun (d)class++ 2) Expand JVM : (a) Java Virtual Method (b) Java Virtual Machine (c) Java Virtual Management (d) Java Virtual Message 3) ______is a compiler which covert a source code into byte code. (a) javac (b)javar (b)javav (d) javaa 4) The byte code is executed by java________ (a) interpreter (b) compiler (c) virtual machine (d) both a & b 5) The symbol _______ is used to separate sataement (a) , (b): (c) ; (d) . 6) The java character set is defined by the ________ character set. (a) Unicode (b) unicast (c) unichar (d) none 7) The first statement allowed in a java file is a __________ statement. (a) interface (b) import (c) package (d) none 8) The browser _______ developed by Sun Microsystems. (a) Hotjava (b) Netscape Navigator (c) Internet Explorer (d) none 9) Java does not support ______ (a) operator overloading (b) pointer (c) templates (d) all 10) Java compiler translate source code into _____ code. (a) byte (b) destination (c) unique (d) none 1) How java differs from c++? 2) Write about java statements 3) Write a note on JVM. 4) Explain various tokens in java. 5) Differentiate java programming and c programming? 6) How java differ from c++? 7) How java interact with internet? 8) Write a note on web browsers. 9) Explain about java statement 1) Explain in detail about java features. 2) Write about the java program structure 3) How do you develop and execute a simple java program? 4) Discuss about the java tokens 5) How java is differ from c and c++? 6) Discuss in detail about the various types of java statement? 7) Explain about the java with internet and web browser 1) ________ is a value that don’t change during the execution of a program. (a) variables (b) constant (c) tokens (d) none 2) A single character is enclosed by _________ character (a) ‘ ‘ (b) “ “ (c) : (d) ; 3) A _______ is an identifier used to store a data value. (a) tokens (b) constant (c) variables (d) none 4) Derived data type is also known as _________type. (a) enum (b) basic (c) reference (d) none of the above 5) The _______are the names of storage location. (a) variables (b) tokens (c) identifier (d) label 6) The size of the int data type is _______bytes (a) 4 (b)2 (c)16 (d)32 7) The backslash character for horizontal tab is________ (a)’\f’ (b) ‘\b’ (c)’\r’ (d) ‘\t’ 9) The variable names can be of ________ length. (a) any (b)8 (c)12 (d)16 10) _______ is a conditional operator. (a)?:: (b):? (c)::? (d)?: 11) The ______statement tests the value of a given variable against a list of case values. (a) if…else (b) switch (c) conditional (d)none 12) The _______statement is used to exit from a switch case statement. (a) break (b) continue (c) label (d) exit 13) The operators ? and : are called as _________operator. (a) Conditional (b) arithmetic (c) logical (d) bitwise 14) The _______ loop is not entry controlled loop. (a) while (b)do...while (c) for (d) switch 15) Objects in java are created using _____operator. (a) new (b) create (c) allocate (d) free 16) _______enables an object to initialize itself when it is created. (a) method (b) destructor (c) Constructor (d) applet 17) Deriving a new class from an old class is knows as (a) inheritance. (b) interface (c) package(d) constructor 18) The class that can ‘t be sub classed is called a _______ (a) finalize class (b) abstract class (c) final class (d) none 1) Define the variable. How it is declared? 2) List out arithmetic operators with example. 3) Write about relational operators. 4) Write about logical operators. 5) Write about ++ & -- operators. 6) Write about assignment operators. 7) Write about conditional & bitwise operators. 8) Explain if…else statement with example. 9) Explain nested if…else statement with example 10) Explain else…if ladder with example 11) Explain switch statement with example. 12) Write about FOR loop in java 13) Write the differences between do…while and while loop in java 14) Write about ? : operator. 15) How to create an object in java 16) Write short note on constructor. 17) How do you declare a method? Explain with example 1) Write a note on variables 2) Explain constants in java in detail. 3) Explain data types in java. 4) Explain the various operators in java in detail 5) Explain arithmetic expressions in detail. 6) Describe in detail about type conversion 7) Explain if and nested if statements with examples. 8) Explain do… while & while looping statements with example. 9) Explain method overloading with example. 10) Explain the following terms in detail. (a) Final classes , variables & methods (b) Abstract classes & methods (c) Finalizer methods 11.) How to overriding a method? Explain with example. 1) An ______is a collection of similar data items. ( a) array (b) structure (c) union (d) package 2) The string method ______is used to sort a set of strings (a) indefof() (b) compareTo() (c) sortTo() (d)sort() 3) Vectors are contained in the ______package. (a) java.util.* (b) java.awt.* (c) java.io.* (d)none 4) The _______ keyword is used to inherit from an interface (a) implement (b) interface (c) Extend (d) none 5) Expand API. (a) Application Programming Interface (b) Application Programming interchange (c) Application Programming inheritance (d) Application Programming information 6) The _____ package is used for date. (a) java.io.* (b) java.awt.* (c) java.util.* (d)none 7) The _______ method is the heart and soul of any thread. (a) Run() (b) start() (c) stop() (d) sleep() 8) The _______ method is used when the premature death of a thread. (a) Run() (b) start() (c) stop() (d) sleep() 9) The _______ state means that the thread is ready for execution. (a) running (b) newborn (c) runnable (d) dead 10) A _______ is similar to a program that has a single flow of control. (a) applet (b) thread (c) API (d) none 1) How to create an array. 2) Write short notes on vector classes. 3) How interfaces are extended in java. 4) Write about wrapper classes. 5) How to define an interface? 6) Write the difference between class & interface 7) Write a note about API packages. 8) Write the steps for creating packages. 9) How to creating a thread. 10) How to stop and blocking a thread 11) Write about thread priority. 12) How to implement runnable interface. 1) Explain one dimensional array with example. 2) Explain two dimensional arrays with example 3) Write the common string methods. 4) Define interfaces .how it is implemented in java. 5) What is mean by inheritance? Explain its types 6) How to accessing a package. 7) Explain the life cycle of a thread. 8) What is an interface? How is it extended & implemented? 9) How to add a class to a package? 10) Define the term “ Synchronization” 1) An _______ is a condition that is caused by a run time error in the program. (a) exception (b) execution (c) error (d) none 2) Java permits us to set the priority of a thread using the________ method. (a) setThread() (b) intPriority() (c) setPriority() (d) none 3) ______ block can be used to handle any exception generated within a try block. (a) Catch (b) throw (c) try (d)none 4) Expand URL. (a) Uniform Resource Locator (b) Universal Resource Locator (c )Uniform Resource Location (d) Universal Resource Location 5) The applet don’t use _____ method for initiating the execution. (a) run() (b) start() (c) Main() (d) execute() 6) The applet attribute ________ specify the URL of the directory (a) Codebase (b) code (c) name (d) url 7) User defined parameters are passed using __________ tag. (a) Param (b) code (c) name (d) url 8) Every applet has its own area of the screen known as __________ (a) Window (b) canvas (c) both a & b (d) none 9) The _______ object realize a top level window complete with border and menu bar. (a) panel (b) container (c) component (d) frame 10) The applet program is executed using ______ (a) javac (b) java (c) appletviewer (d) none 1) Write a note on Exception. 2) Write about multiple catch statement 3) Give a short note on finally statement 4) How do you throw your own exception? 5) List out the common java exceptions. 6) How to you build applet code. 7) Write about the Applet tag. 8) How do you design a web page? 9) How do you pass parameters to Applet. 10) How do you draw an arc? Explin with example 11) How do you draw a polygons? Explin with example 1) Explain the types of errors in java. 2) Explain the syntax of exception handling code. 3) Explain the life cycle of an applet. 4) Describe about event handling mechanism? 5) Explain about the following (i) Line (i) Rectangle (iii) circle (iv)Ellipses 6) Describe about AWT packages 7) Explain about the following (i) multiple catch statement (ii) Finally statement 8) How do you get the input from the user. Explain it with example 9) How do you draw the following designs (i) Arcs (i) polygons (iii) bar charts 10) How do you write an applet program? How will you execute it? 1. Data stored in files is called___________ data (a) Object (b) persistent (c) derived (d) stream 2. The _________ stream extracts data from the source and sent to the program. (a) Input (b) output (c) both a& b (d) buffer 3. The _________ stream takes data from the program and send it to destination. (b) Input (b) output (c) both a& b (d) buffer 4. Stream classes contained in ________ packages. (a) Java.io (b) java.util(c) java.lang (d) java.awt 5. The class _____ used for breaking up a stream of text from an input. (a) String tokenizer (b) input tokenizer (c) stream tokenizer (d) none. 6. The _______ class is used for reading character in file. (a) FileInputReader (b) FileReader (c) FileWriter (d) FileOutputWriter 7. The _______ class is used for writing character in file. (b) FileInputWriter (b)FileReader (c) FileWriter (d) FileOutputWriter 8. The _______ class is used for reading bytes in file. (c) FileInputReader (b)FileReader (c) FileInputStream (d) FileOutputWriter 9. The _______ class is used for writing bytes into a file. (a)FileInputWriter (b) FileOutputWriter (c) FileWriter (d) FileOutputStream 10. Random access files class is supported by __________ packages. (a) Java.io (b) java.util(c) java.lang (d) java.awt 1. Explain about Concept of streams 2. Write a note on java Stream classes 3. Explain about character stream classes 4. How character stream and byte stream classes are differ in task? 5. List out the important I/O Exception classes and their functions 1. Write a note on reading and writing bytes in files 2. How do you create a file in java? 3. Explain in detail about reading and writing character in files 4. Explain in detail about reading and writing bytes in files
5. Explain in detail about Random Access File
6. How do you handle primitive data types in java file
Test Bank for Java Programming, 9th Edition, Joyce Farrell, ISBN-10: 1337397075, ISBN-13: 9781337397070 - Quickly Download And Experience The Full Content
Download all chapters of Test Bank for Java Programming, 9th Edition, Joyce Farrell, ISBN-10: 1337397075, ISBN-13: 9781337397070 as a single PDF instantly.