0 ratings 0% found this document useful (0 votes) 4 views 14 pages Java Programming 2024-25
This document is an examination booklet for the B.C.A. (Fourth Semester) Examination in Internet and Java Programming for the academic year 2024-25. It includes important instructions for candidates regarding the examination process, such as handling the question booklet and filling out the OMR answer sheet. The document also contains various questions related to internet concepts and Java programming, along with multiple-choice options.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Save Java Programming 2024-25 For Later
2187116
Serial No. of Booklet :
1296
B.C. A. (Fourth Semester) Examination, 2024-25
‘AFFIX PRESCRIBED
RUBBER STAMP Paper Second
INTERNET AND JAVA PROGRAMMING
Course Code—BCA-402T (Major)
Tn Figues Gat a) = | ( LTT
Roll No.
In Words (a):
:2Hrs. Signature of Im
or
Max. Marks : 75
ou Pre & eee
Important Instructions : aera rea
1. Thecandidate will write hishher Roll Number 1, taal am amie daa oat wrt we
only at the [Link] for, i. €, on the fet ot gad fore RA wa = owl we
cover page and on the OMR answer sheet at giver } RA ge wn aR fea wa
the end and nowhere else. St, UA. TR, AR TAR, we aA we et
fore
2, Immediately on receipt of the question 2, wea gaat Part Gl aneefl at ata ad
booklet, the candidate should check up the R
rote my cn more gar peer er av ue 8 ge 9
pages and that no question is missing. If the eI |
candidate finds any discrepancy in the fant @ at wer year Pret & 10 fre
question booklet, he/she should report the & fer & oe oies a gta wen ate
invigilator within 10 minutes of the issue of ay fier 9 a aad ger year
this booklet and a fresh q booklet mln wt ma
without any discrepancy is obtained.
3. No second question booklet shall be given to 3. Reh A GRR A 10 Pete are snail aT
a candidate under any circumstances after 10 ath wer gio a RAH one a we
minutes. The candidate should be careful in gReer a geht | ar ate oh cL a
handling the question booklet and in filling ead
the OMR answer sheet given separately with eer wert afeq
this booklet.
® ae (Contd. on the last page / ara Fide afer FSR)Isp internet
between their networks by
exchanges traffic 5.
{A) Internet exchange point
(B)+ Subscriber end point
(C)_ Isp end point
(D) Intemet end point
To join the internet, the computer
has to be connected to a...
(A) Internet archi
ccture board
(B)s Internet service provider \
(C) Intemet society
(D) Different computer
Internet
by transmitting
digital data over the wires of a
Jocal telephone
provided by
network — is
(A) Leased line 8.
(B)_ Digital lease line
(C) Digital signal line
(D) , Digital subscriber line
What is internet ?
(A) A single network
(B) A. collection of unrelated
computers
(C) ulnte
networks
nection of wide area
(D) Interconnection of loc
networks
(2)
6.
Which of the following protocols
is used in the internet ?
(A) rTP
(B) DUCE
(C) DNS
(D) DNS, HTTP and DHCP.
‘The size of an IP address in IPv6
is:
(A) 32 bits
(B) 64 bits
(C) , 128 bits —
(D) 265 bits
Internet works on:
(A), Packet switching
(B) Circuit switching
(C), Both (A) and (B)
(D) Data switching
Which one of the following is not
an application layer protocol used
in internet ?
(A) Local procedure call
(B) Internet relay chat
(C) Resource
* protocol
(D) Remote procedure call
reservation
Which protocol assigns IP address
to the client connected in the
internet ?
(A). DHCP ~
(B) IP
(C) RPC
(D) RSVP
12961 @. URL stands for :
(A), Uniform Resource Locator,
(B) Uniform Research Locator
(C) Uniform Resource Link
(D) Uniform Research Link
A network that links
different types of computers all
over the world :
(A) Intranet
(B), Internet
(C) Arpanet
(D) LAN
many
Internet was evolved from the
basic ideas of ARPANET :
(A) True ~
(B) False
(C) Both (A) and (B)
(D) None of the above
A service that allows a user to log
in another computer
somewhere on the Internet :
(A), Telnet ~~
(B) FTP
(C) e-mail
(D) UseNet
into
Any system that uses the HTTP.
protocol is called :
(A) Web Browser
(B)- Web Server (~~
(Cc) WWW
(D) TCP/IP
(3)
Anonymous FTP files are called
2 accessible files.
(A) Privately
(B), Publicly. ~
(C) Batch
(D) User
Which one of the following is not
used in media access control ?
(A) Ethernet
(B)- Digital subscriber line
(C) Fiber distributed
interface
(Q) Packet switching
data
|. An internet service that allows the
user to move a file is :
(A), FTP 4
(B) Telnet
(C) UseNet
(D) Time Sharing
. Which statement is true about
Java?
(A) Java is a sequence-dependent
programming language
(B) Java is a code dependent
programming language
(C) Java is a platform-dependent
programming language
(D), Java is a __platform- ,
independent programming —
language
12961 @34. What is Truncation in Java ?
(A) Floating-point
assigned to a Floating type
(B), Floating-point value
assigned to an integer type“
(C) Integer value assigned to
floating type
(D) Integer value assigned to
floating type
value
35. What will be the output of the
following Java program ?
class Output
{
Publicstaticvoid
main(String args[])
{
int arr[]={1, 2, 3, 4, 5};
for (int i = 0; i < [Link]-
+i)
[Link] printin (art{i]+" ") ;
}
}
(A) 12345
(B) 1234
(C) 12
(D),123 _>
36. What is the extension of compiled
java classes ?
(A) txt
(B) js :
(C)-.class./
(D) java
(6)
37. What will be the output of the
following Java code snippet ?
class abe
{
publicstaticvoid main(String
args[])
{
if ([Link]>0)
[Link]([Link]) ;
}
}
(A), The snippet compiles and
runs but does not print
anything
(B) The snippet compiles, runs
and prints 0
(C) The snippet compiles, runs
and prints 1
(D) The snippet does not compile
Which exception is thrown when
java is out of memory?
(A) Memory Error
(B)- Out Of Memory Error
(C) Memory Out Of Bounds
Exception
(D) Memory Full Exception
Which of these are selection
statements in Java ?
(A) break
(B) continue
(©) ford)
(D), if) —
12961@30,
Es
. Which environment variable is
used to set the java path ?
(A) MAVEN Path
(B) JavaPATH
(C) JAVA
(D), JAVA_HOME \ ~
. Which of the following is not an
OOPS concept in Java ?
(A) Polymorphism
(B) Inheritance
(C) «Compilation
(D) Encapsulation
Which of the following is a type
of polymorphism in Java
Programming ?
(A) Multiple polymorphism
(B)e Compile time polymorphism .~
(C) Multilevel polymorphism
(D) Execution
polymorphism
time
What will be the error in the
following Java code ?
byte b =50:
b=b*50;
(A) b cannot contain value 50
(B) b cannot contain value 100,
limited by its range
(C) No error in this code
(D)-* operator has converted b *
50 into int, which cannot be'~
converted to byte without
casting
(5)
32, What is not the use of ‘this’
Se .
keyword in Java?
(A) Referring to the instance
variable when a _ local
variable has the same name
(B) Passing itself to the method
a eS
of the same class
(C) Passing itself
method
(D) Calling another constructor
to another
in constructor chaining
33. What will be the output of the
following Java program ?
class leftshift-operator
‘
publicstaticvoid
main(String args[])
{
byte x =64;
inti;
byte y;
j=x<<2:
y = (byte) (x <<2) :
[Link](i +" "ty)s
}
}
(A) 0256
(B) 064
(C) 25600
(D) 640
12961 @19. Allows the user to create and
maintain a personal list of favorite
URL addresses :
(A) Software
(B) Web Servers
(C). Web Browsers
(D) WWW
20. TCP stands for ?
(A) Transmission
program
(B), Transmission _-
protocol =~
(C) Transfer control program
(D) Transfer control protocol
control
control
21. Who invented Java Programming?
(A) Guido van Rossum
(B)» James Gosling
(C) Dennis Ritchie
(D) Bjarne Stroustrup
22. Any computer that can access the
server is called ?
(A) Web Server
(B) Web Browser
(C) User
(D), Web Client -~
23. Which component is used to
compile, debug and execute the
java programs ?
(A) JRE
Qi
(©), JDK
(D) JVM
(4)
26.
27.
Which one of the following is not
a Java feature ?
(A) Object-oriented
(B), Use of pointers
(C) Portable
(D) Dynamic and Extensible
Which of these cannot be used for
a variable name in Java ?
(A) Identifier & keyword
(B) Identifier
(C), Keyword
(D) None of the above
What is the extension of java code
files ?
(A) is
(B) txt
(C) .class
(D), java -~
What will be the output of the
following Java code ?
class increment {
Public static void = main
: (String args[])
int g = 3;
[Link] print (++g * 8);
}
2
(A), 32
(B) 33
(C) 24
(D) 25
1296/@
30.
a.54, What is the extension of compiled
java classes ?
(A), class.
(B) java
(C) txt
©) is
. Which of these operators can be
used to get run time information
about an object ?
(A) getInfo
(B) Info
(C) instanceof ~
(D) getinfoof
56.
What is the Message is displayed
in the applet. made by the
following Java program ?
[Link].*;
[Link].*;
publicclass myapplet extends
Applet
{
publicvoid paint (Graphics g)
{
[Link](“A Simple
Applet”, 20, 20) ;
}
}
(A), A Simple Applet
(B) A Simple Applet 20 20
(C) Compilation Error
(D) Runtime Error
(9)
57.
58.
.
60.
Which component is responsible
for converting bytecode into
machine specific code ?
(A, VM
(B) JDK
(©) st
(D) JRE
Which component is used to
compile, debug and execute java
program ?
(A) JVM
(B), IDK
(©) aT
(D) JRE
Which component is responsible
to run java program ?
(A), JRE
(B) IDK
(©) mT
(D) IVM
Which component is responsible
to optimize bytecode to machine
code ?
(A) JVM
(B) JDK
(C), ITU
(D) JRE
1296/@46. What is the numerical range of a
char data type in Java?
(A) 00 256
(B) ~ 1280 127
(C) ,0 0 65535
(D) 0 032767
47, Which one of the following is not
an access modifier ?
(A), Protected
(B)_ Voidy
(C) Public
(D) Private
48. Which of these keywords are used
for the block to be examined for
exceptions ?
(A) check
(B) throw
(C) catch
(D), ty
49. Which
independent
class provides system
server side
implementation ?
(A) Server
(B) ServerReader
(C) Socket
(D), ServerSocket -~
50.
Sl.
a.
53.
(8)
Which of the following is true
about servlets ?
(A) Servlets can use the ful]
functionality of the Jaya
class libraries
(B), Servlets execute within the
address space of web server.
platform independent ang
uses the functionality of java
class libraries
Servlets execute within the
address space of web server
Servlets are _platform-
independent because they are
written in java
©
(D)
Which of these functions is called
to display the output of an applet ?
(A) displayQ)
(B)q paint() p~
(C) displayApplet()
(D) PrintApplet()
Which of these methods can
be used to output a string in an
applet ?
(A) display()
(B) print()
(©), drawString()
(D) transient()
Which of these methods is a part
of Abstract Window Toolkit
(AWT)?
(A) display()
(B). paint() -—~
(C) drawString()
(D) transient()
129610
54.
56.40.
al.
42.
Which of these keywords is used 43.
to define interfaces in Java?
(A) inte
(B) Intf :
(C). interface™~
(D) Interface
What will be the output of the
following Java program ? 44.
class output
{
publicstaticvoid main(String
args{})
{
StringBuffer sl
=newStringBuffer (“Quiz”) ;
StringBuffer s2 = sl. reverse() : 45.
[Link] (s2) ;
}
}
(A) Quizzing
(B) ziuQQuiz
(C) Quiz
(Dy ziuQe~
Which of the following is a
superclass of every class in Java ?
(A) ArrayList
(B) Abstract class
(C), Object class, 7
(D) String
wm
Which of the below is not a Java
Profiler?
(A) ,JProfiler
(B) Eclipse Profiler
(QVM
(D) JConsole
Which of these packages contains
the exception Stack Overflow in
Java?
(A) [Link]
(B) javasystem
(C), [Link]
(D) [Link]
Which of these statements is
incorrect about Thread ?
(A) start() method is used to
begin execution of the thread
(B}, run() method is used to begin
execution of a thread before
start() method in
cases
(C) A thread can be formed by
implementing
special
Runnable
interface only
oO
A thread can be formed by a
class that extends Thread
class
1296/1 ®70. Which one of the following
72.
73.
contains date information ?
(A), [Link]
(B) [Link]
(©) j Time
(D) [Link]
What does set Auto Commit
(false) do?
(A) commits transaction after
cach query
(BY, explicitly commits
transaction
(C) does not commit transaction
"automatically after each
query
(D) never commits transaction
Which of the following is used to
call stored procedure ?
(A) Statement
(B) PreparedStatement
(C), CallableStatment __
(D) CalledStatement
Which of the following is used
to limit the number of rows
returned ?
(A), setMaxRows(int i) | ~~
(B) setMinRows(int i)
(C) getMaxrows(int i)
(D) getMinRows(int i)
(11)
74. Which of the following is method
of DBC batch process ?
(A) setBatch()
(A) deleteBateh()
(C)removeBatch(Q)
(Dy, addBatehQe
defined in which of
(D), [Link] VU
76. Which of the following is not a
JDBC connection isolation
levels ?
(A) TRANSACTION_NONE
(B) TRANSACTION_READ_
COMMITTED.
(C) TRANSACTION
REPEATABLE READ
(D). TRANSACTION _
NONREPEATABLE_READ
77, Which of these method is used
to register a keyboard event
listener?
(A) KeyListener()
(B) ,addKistener()
(C), addKeyListener()
(D) eventKeyboardListener()
1298161
62.
63.
Which statement is true about
java?
(A)p Platform independent
programming language
(B) Platform dependent
programming language
(C) Code dependent
programming language
(D) Sequence dependent
programming language
Which of the below is invalid
identifier with the main method ?
(A) public
(B), static
(Qy private
(D) final
What is the extension of java code
files ?
(A) .class
(B)- java
(C) txt
(D) Js
Which of these modifiers can be
used for a variable so that it can
be accessed from any thread or
parts of a program ?
(A) transient
(B)- volatile
(C) global
(D) No modifier is needed
(10)
65.
66.
67.
68.
69.
Which of the following is used 4g
rollback a JDBC transaction >
(A), rollback) L-
(B) rollforward()
(C) delete Transaction()
(D) Remove Transaction()
70
What is use of interpreter ?
(A) They convert bytecode to
machine language code
(By, They read high level
and execute them
(C) They are intermediate
between JIT and JVM
(D) Itis a synonym for JIT
a
code
Which of the following contains
both date and time ?
(A) [Link]
(B) [Link]
(C) [Link]. date
(D), [Link],_—~
Which of the
advantage of
connection pool ?
(A) Slow performance
(B) Using more memory
(C) Using less memory
(D)g Better performance \-~
Which of the following
advantage of using Prepared
Statement in Java ?
(A) Slow performance
(B) Encourages SQL injection
(C) Prevents SQL injection
(D) More memory usage
following is
using JDBC
12961gg. Which of the following code is
ha o used to get an attribute in a HTTP
session object
ion. gel.
93. Which file separator show
used by MANIFEST. file? in servi
(Ap / & (Ay
me)
(B) \
«) (B) 5 ‘[Link]( String.
(~D) name)
94, Method to retrieve the JDBC (©) session updateAUtribute
template : (String name)
(A)4 sctdbe Template() (D) [Link]( String
(B) getTemplate() name)
(C)_ getidbe()
(PD) wetdbeTemplate() 99. When destroy() method of a filter
Java Beans are extremely is called ?
sd? : (A), The destroy() method is
al * called only once at the gud of
(B) True the life cycle ofa filter
(C) Niether (A) nor (B) (B) The destroy() method is
(D) All of the above called after the filter has.
7 executed doFilter method
96. How constructor can be used for a : : ;
serict (C) The destroy) method is
(A) Initialization pane er ie 4 the
(B) Constructor function egining of the life cycle of a
(©), Initialization and Constructer_~ aed
function (D) The destroyer() method is
(D) Setup() method called after the filter has
on executed
. RowMapper implementation : toa
which can automatically map a 100. How is the dynamic interception
row to a new instance of the of requests and responses to
pate class. transform the information done ?
i Penns DRT (A) servlet container
canPropertyRow (B) servlet config
(C) Both (A) and (B) c
. (C) servlet context
(D) None of the above D ~
o servlet filter ~~~
(14)
12961 @88.
which of these events will be
s jotified if scroll
manipulated ?
(A) Action Event
(B) Component Event
(C) ¢Adjustment Event!
(D) Window Event
bar is
What is the difference between
servlets and applets ?
(i) Servlets execute on Server;
Applets execute on browser
(ii) Servlets have GUI:
Applet has GUI
(iii) Servlets creates static web
pages: Applets
dynamic web pages
(iv) Servlets can handle only a
single request; Applet can
handle multiple requests
(A) option (i), (ii),
correct
(B) , option (i), (ii) are correct -—~
(C) option (i), (iii) are correct
(D) option (i), (ii), (iii), (iv) are
correct
no
creates
On applying Left shift operator,
<<. on integer bits are lost one
they are shifted past which
position bit ?
(A) 32
(B),31 ~~
(C) 31
(D) 33
(13)
90.
a
92.
i is super class
ofall the events ¢
(A), EventObjec
(C) ActionEvent
(D) lemEvent
Which of the following is correct
error when loading JAR file with
duplicate name ?
(A), [Link]. NullPointerException
(B) [Link]
«Cy [Link]
Which of the following is not an
Enterprise Beans type ?
(A), Doubleton |
(B) Singleton
(C) Stateful
(D) Stateless
Which of the following is not true
about Java beans ?
(A, Implements
[Link] interface
(B) Extends [Link]
class
(C) Provides
constructor
(D) Provides setter and getter
methods for its properties
no argument
1296/1 ®93. Which file separator should be
used by MANIFEST file ?
(Ae /
(B) \
©)
(D) //
94. Method to retrieve the JDBC
template +
(A). setidbe Template()
(B) getTemplate()
(C) getIdbe()
(DP) -getldbeTemplate()
Se Java Beans are
secured? P
(A), False
(B) True
(C)_ Niether (A) nor (B)
(D) All of the above
extremely
96. How constructor can be used for a
servlet ?
(A) Initialization
(B) Constructor function
(©), Initialization and Constructor
function
(D) Setup() method
97. RowMapper implementation
which can automatically map a
row to a new instance of the
specified class.
(A), BeanPropertyRowMapper.
(B) BeanPropertyRow
(C) Both (A) and (B)
(D) None of the above
(14)
98. Which of the following code is
used to get an attribute in a HTTP
n object in servlets?
sion. getAttribute( String
(B)_session.alterAttribute(String
name)
[Link]
(String name)
(D) session setAttribute(String
name)
99, When destroy) method of a filter
is
led ?
(A). The destroy() method is
* called only once at the gad of
the life cyele of a filter
(B) The destroy() method is
called after the filter has
executed doFilter method
(©) The destroy() method is
called only once at the
begining of the life cycle of a
filter
(D) The destroyer() method is
called after the filter has
executed
100. How is the dynamic interception
of requests and responses to
transform the information done ?
(A) servlet container
(B) servlet config
(C) servlet context
@) serviet filter t
1296 ®