These are the Java MCQs Question asked in 2023 BCA Exam.
What is process when two or more threads need to access share resource, they need some way to ensure that resource will used by only one thread at a time?
Deadlock
Synchronization
Interthread communication
Starvation
Which of the following is unchecked exception in java?
IOException
SQLException
NullPointerException
FileNotFoundException
Which of the following class is used to read data from file in character Stream?
FileInputStream
FileOutputStream
FileReader
FileWriter
Which of the following is not valid declaration of for loop?
for(int a=7;a<=77;a+=7)
for(int a=99;a>=0;a/9)
for(int a=2;a<=20;a=2*a)
for(int a-20;a-2; –a)
Which of the following is not primitive data type defined in Java?
Byte
long
Boolean
String
What is process by which one object acquires all the properties and behaviors of another object?
Inheritance
Polymorphism
Abstraction
Encapsulation
Which of the following is not method of Iterator?
hasNext()
next()
remove()
empty()
Which of the following keyword is used to derive child interface from parent interface?
Package
import
extends
implements
What is name of swing control that is normally display one entry and act as dropdown list?
JList
JComboBox
JRadioButton
JCheckBox