Professional Documents
Culture Documents
General Questions:
1. Platform independence.
3. Byte codes
5. What is JVM?
6. What is the software used to develop the java applications and state
10. Give the commands for compiling and running a java program
manually.
2. Type casting
3. Automatic conversion
5. Define inheritance.
overloading?
1. Define package.
in java.
3. What are the access specifiers present in java? Discuss about their
visibility
4. Define interface.
Streams
1. Define stream.
3. Which two streams act as abstract class for byte oriented streams?
streams?
8. What are the exceptions thrown by Output Stream and Input Stream
class?
Threads
1. Define thread.
2. Differentiate between thread and process.
6. How the constructors differs for the creation of thread using two ways.
8. Define synchronization.
use of it.
Exception
1. Define exception.
2. What are the two types of custom exceptions that can be created in
java?
everywhere
2. long i = 700.20;
Upcasting
Local variable
concrete methods.
class
7. System.out.println("Hi");;;
None of these
to package
extension
QueryString
FlowLayout
13. The controls (or) components used in applet are present in the
package
java.util.*
implemented,imported
d.Protocol
generic servlet?
res)
a. 1 b. 2 c. 3 d.4
duplicate elements?
I Class Test
1. What is the correct HTML for making a hyperlink
a. <a url="http://www.yahoo.com">Yahoo</a>
b. <a name="http://www.Yahoo.com">Yahoo</a>
c. <a>http://www.yahoo.com.com
d. <a href="http://www.yahoo.com">Yahoo one</a>
2. Which of these tags are all <table> tags
a. <table><tr><tt>
b. <table><tr><td>
c. <table><head><tfoot>
d. <thead><body><tr>
3. If you want to have the browser open a new window for a link to an
outside page, which attribute would you use?
a. alt
b. target
c. src
d. start
4. If you want your ordered list to use capital letters and start with the letter
D, which attributes would you use
a. type="a" start="D"
b. type="A" start="D"
c. type="A" start="4
d. type="letter” start=”D”
6. HTML tags use brackets to contain the information. What kind of notation
do Cascading Style Sheets use to contain information?
b. Parentheses
c. Curly brackets
d. Forward slashes
7. The default port number by which HTTP communication takes place is-
_________
a. Network of networks
b. Collection of networks
d. Both a & b
14. Each computer and a network device that are connected to the internet
are called as_________ and _________ respectively.
a. Node and Host b. Host and Node c. Device and Host d.
Node and device
c. Tags are the HTML codes that control the appearance of the document
contents
Out of the above which is (or) are false with related to HTML
java interpreter.
code
manipulates and keeps both safe from outside interference and misuse.
13) Inheritance is the process by which one object acquires the properties
of another object.
16) The size of the data type in java remains the same on any machine
architecture.
17) The size and range of byte is 8 bits and -128 to 127.
18) The size and range of int is 32 bits and -32768 to 32767
21) When byte is converted into int, this type of conversion is known as
widening conversion.
22) When int is converted into byte, this type of conversion is known as
Narrowing conversion.
truncation.
24) ? Operator in java is called as ternary operator.
a. Exit a loop
b. As a form of goto.
c. To continue.
d. As a form of jump.
30) When a local variable has same name as an instance variable, local
32)Finalize () method contains some code to free the resources before the
collection.
38) Static members can be accessed before any of its objects are created.
charAt() method.
47) When a method in subclass has the same name and type signature as a
49) Overridden methods are one way that java supports one interface,
50) A class which does not have concrete methods is called as abstract
class.
51) A abstract class may have abstract methods and concrete methods
54) The mechanism in java for partitioning the class name space into more
55) The package statement defines a name space in which classes are
stored.
57) Interface specifies what a class must do, but not how it does it.
58) A class can extend only one package at a time and can implement
at run time.
66)Try{
}
Catch(Exception e) {}
} catch(ArithmeticException e1){}
False
68) Finally creates a block of code that will be executed after a try/catch
Checked Exception
Questions:
Characteristics of java
This operator
Constructors vs methods
Inheritance-super keyword, Dynamic method dispatch
Finally,final,finalaize()
browser.
5. The attribute of applet tag which contains the name of the applets
APPLET FILE
applets
model.
method.
21. Action Listener Interface defines one method to receive action events.
22.Adapter classes are useful when only some of the methods in listener
23. All user interface elements that are displayed on the screen and that
24. All user interface elements that are displayed on the screen and that
border.
(actionPerformed(ActionEvent e))
(itemEvent i))
a. setForeground(Color.blue) b. setForeground(blue)
c. setColor(Foreground.blue ) d. setForeground(Color)
36.The background color of an applet can be set by
a. setBackground(Color.blue) b. setBackground(blue)
c. setColor(Background.blue ) d. setBackground(Color)
37. Two types of color schemes followed in java are RGB (Red, blue, green)
38. Controls (checkbox, text field, button etc) are components that allow
within a container
d. Flowlayout.Right
48. Border layout contains 4 fixed width components and one large area
in the center.
Questions
1. Define applet.
5. Different Layouts
events.
9. Adapter classes.
Java Servlets
1. In the earlier days communication between Web client and web server
servlets.
build servlets.
dependent
a. javax.servlet.http.*; c. javax.servlet.*;
b. java.servlet.*; d. java.servlet.http.*;
1. javax.servlet.http.*; 2. javax.servlet.*;
3. java.servlet.*; 4.java.servlet.http.*;
the address bar the information entered by the user will be appended
like…www.google.co.in?search=yahoo)
a. Init(),paint(),service(),destroy()
b. Init(),doget(),service(),destroy()
c. Init(),service(),destroy()
d. Init(),doPost(),destroy()
their environment.
UnavailableExeption.
21. The value entered by the user in form can be retrieved in servlets via
interface.
22. Cookie is stored on a client and contains state information.
date.
GET method.
POST method.
28. getCookie() method is used to read any cookie from a client request.
Networking:
unreliable protocol.
34. UDP provides faster data transfer than TCP.
40. The conversion of domain names into IPaddress and vice versa is done
44. getByName() method returns the InetAddress object for a host name
passed to it.
45. Two kinds of Sockets in java are TCP sockets and UDP sockets.
46. Two kind of TCP socket class in java are ServerSocket and Socket.
49. Send and receive methods in UDP are present in Datagram Socket
class.
machines.
DatagramPackets
b. Protocol,path,portnumber,domain name
resource.
57. The mechanism which allows a java object that executes on one
58. Remote interfaces in RMI must extend the Remote Interface which is
present in java.rmi.package.
59. Lookup() method is used in client side to check in the RMI registry..
60. Rebind() method is used in the server side to bind the component in
65. The mechanisms for accessing the various databases are present in
java.sql.*
67. The JDBC driver manager ensures that the correct driver is used to
Questions:
1.Servlets vs CGI.
world).
3. Life cycle of servlets.
6. SessionTracking.
7. JDBC drivers.
11.JDBC drivers.