WT 2 MarksQuestions (AllUnits)
WT 2 MarksQuestions (AllUnits)
WT 2 MarksQuestions (AllUnits)
1 Introduction and
Core Java
(2 Marks Questions)
Network
Fig. 1.3.1.
1.10. What is the difference between JDK, JRE, JIT and JVM ?
AKTU 2015-16, Marks 02
Ans.
1. Java Development Kit (JDK) is a bundle of software components
that is used to develop Java based applications.
2. Java Runtime Environment (JRE) is an implementation of the
JVM which actually executes Java programs.
3. Just In Time compiler (JIT) compiler is a component of JRE which
improves the performance of Java applications by compiling byte
code to native machine code at runtime.
4. Java Virtual Machine (JVM) is an abstract computing machine.
1.14. What are the two major protocols for accessing e-mail from
servers ? AKTU 2018-19, Marks 02
Ans. Post Office Protocol version 3 (POP3), Simple Mail Transfer Protocol
(SMTP) are the two majo r pro to co ls used fo r accessing
e-mail from servers.
1.17. Define Path in JDK. How path is different from class path ?
AKTU 2019-20, Marks 02
Ans. Path variable is set for providing path for all Java tools like Java,
Javac, Javap, Javah, jar, Appletviewer which are used in Java
programming. All these tools are available in bin folders so we set
path upto bin folders.
S. No. Path Class path
1. Path variable is se t fo r Class path variable is set for
providing path for all java tools providing path of all Java classes
like Java, Javac, Javap, Javah, which is used in our application.
jar, Appletviewer
2. It contains a path to the Java It contains a path of the classes
tools. provided by JDK.
3. Java tools include Java, Javac, All the classes are available in
Javap, Javah. “rt.jar” file.
4. Command to check path : Command to check class path :
>>echo %path%. >>echo %classpath%
2 Marks Questions SQ–6 D (IT-5/CS-6)
Web Technology SQ–7 D (IT-5/CS-6)
2.1. Explain the HTML tags : Table, frame and forms with the
help of suitable examples. AKTU 2015-16, Marks 02
Ans. Table :
A table is a two dimensional matrix, consisting of rows and columns.
Example :
<table><tr>
<td> row 1</td>
<td> row 1</td>
</tr>
</table>
Frame :
The HTML frame is a powerful feature that enables a web page to
be broken into different unique sections, that although related and
operate independent of each other.
Example :
<framset cols = “50%, 50%”>
<frame src = “File 1.html”>
<frame src = “File 2.html”>
</framset>
Forms :
All the input elements should be enclosed within the opening and
closing tags like this :
<FORM> The input elements go here </FORM>
Example :
<form>
Login :
<input type = “text” name = “login” size = ” 30”>
Password :
<input type = “password” name = “password” >
<input type = “submit” value = “Submit”>
</form>
Ans. CSS is a language that describes the style of the HTML document.
Different ways of creating stylesheets are :
1. Inline stylesheets
2. Embedded stylesheets
3. External stylesheets
2.6. What are forms and how they are created in HTML ?
AKTU 2017-18, Marks 02
Ans. An HTML form is a section of document containing normal content,
markup, special elements called controls (checkboxes, radio buttons,
menus etc.) and labels on those controls.
The HTML <form> tag is used to create an HTML form and it has
following syntax :
<form action = “script URL” method = “GET|POST”>
Form elements like input, text area etc.
</form>
Example :
<!DOCTYPE html>
<html lang=“en-US”>
<head>
<title>Welcome to Quantum Page </title>
</head>
<body>
<h1 onclick=“this.style.color=‘red’”>Hi Everyone!</h1>
</body>
</html>
Width
2. It is basically one website design that will look good at any size from
a large desktop LCD monitor to the smaller screens we use on
smart phones and tablets.
3. Facebook, Youtube are the example of responsive webpage.
Web Technology SQ–13 D (IT-5/CS-6)
3 Scripting and
Networking
(2 Marks Questions)
Web Technology SQ–15 D (IT-5/CS-6)
Ans.
S. No. Java Bean EJB
1. The Java Bean components The EJB components are
can be visible or invisible to always invisible to the user.
the user.
4.7. What are JAR files ? Explain its advantage. Write the
command for creating JAR file. AKTU 2017-18, Marks 02
Ans. A JAR (Java ARchive) file is a file that contains compressed version
of class files, audio files, image files or directories.
Advantages of JAR file :
a. Security
b. Decreased download time
c. Compression
To create a JAR file, we can use following command :
jar cf jarfilename inputfiles
4.11. Compare JDBC and ODBC. List the different types of JDBC
drivers. AKTU 2019-20, Marks 02
Ans. Comparison :
S. No. JDBC ODBC
2 Marks Questions SQ–18 D (IT-5/CS-6)
5.1. What do you mean by servlets ? What are the methods used
in life cycle of servlets ?
Ans. Servlets are server-side components that provide a powerful
mechanism for developing server-side of web application.
The life cycle of a servlet uses following three methods :
a. Init() method
b. Service() method
c. Destroy() method
Ans. Java Server Pages (JSPs) are simple and powerful technology used
to generate dynamic HTML documents on the server-side.
5.10. Discuss about Tomcat server. How to set the Class path
for servlet in Tomcat server ? AKTU 2019-20, Marks 02
Ans. Tomcat server : Refer Q. 5.7, Page SQ–19D, Unit-5, Two Marks
Questions.
To set class path for servlet in Tomcat server :
1. Copy servlet-api.jar file location and set the class path in environment
variable.
2 Marks Questions SQ–20 D (IT-5/CS-6)
2. If our class path is already set for core java programming, we need
to edit class path variable. For edit classpath just put ‘;’ at end of
previous variable and paste new copied location (without deleting
previous classpath variable).