SSC & HSC Supplementary Exam Result Live Now Click Me !

Gondwana University MCQ Exam 2022 - Computer Science I ( Core Java ) Question & Answer, See Answersheet | Exam Helper

Gondwana University,Gondwana University Summer Exam 2022,Gondwana University MCQ Exam 2022,Computer Science,Core Java

BSC - CBCS Pattern . Sem - 6
Computer Science I 
( Core Java )
Question & Answer 
Time: 1 Hours

USCST11.1  - 2022 ( MCQ Exam )
  • All Questions are  compulsory.
  • Our team provided answer sheet to get help up coming exam. 
  • Our Expert team given all answered .

Q.1) An expression involving byte, int, and literal numbers is promoted to which of these?
  1. int
  2. long
  3. byte
  4. float

1. int

Q.2) Modulus operator, %, can be applied to which of these?
  1. Integers 
  2. Floating- point numbers
  3. Both Integers and Floating - point numbers
  4. non of these

3. Both Integers and Floating - point numbers

Q.3) Which of these jump statements can skip processing the remainder of the code in its body for a particular iteration?
  1. break 
  2. return
  3. exit
  4. continue

4. continue

Q.4) Which of the following is not a decision making statement?
  1. if
  2. if-else
  3. switch
  4. do-while

4. do-while

Q.5) Which of the following is not a valid flow control statement?
  1. exit ()
  2. break
  3. continue
  4. return

1. exit()

Q.6)  What allows the programmer to destroy an object x?
  1. x.delete()
  2. x.finalize()
  3. Runtime.getRuntime().gc()
  4. Only the garbage collection system can destroy an object

4. Only the garbage collection system can destroy an object

Q.7) Which of the following is a type of polymorphism in Java?
  1. Compile time polymorphism 
  2. Execution time polymorphism 
  3. Multiple polymorphism 
  4. Multilevel polymorphism 

1. Compile time polymorphism

Q.8) Which concept of a Java is a way of converting real world objects in terms of classs?
  1. Polymorphism
  2. Encapsulation 
  3. Abstraction
  4. Inheritance

3. Abstraction

Q.9) Which of these is correct way of calling a constructor having no parameters, of superclass A by superclass B?
  1. super.(void);
  2. superclass.();
  3. super.A();
  4. super();

4. super();

Q.10) Which of this keyword can be used in a subclass to call the constructor of superclass?
  1. super
  2. this
  3. extent
  4. extends

1. supar

Q.11) Which of these keywords is used to define packages in Java?
  1. pkg
  2. Pkg
  3. package
  4. Package

3. package

Q.12) Which of this access specifies can be used for a class so that its members can be accessed by a different class in the same package?
  1. Public
  2. Protected
  3. No Modifier
  4. all of these

4. all of these

Q.13) Which of this access specifies can be used for a class so that its members can be accessed by a different class in the different package?
  1. Public
  2. Protected
  3. Private
  4. No Modifier

1. Public

Q.14) Which of the following is the correct way of importing an entire package "pkg"?
  1. import pkg.
  2. Import pkg.
  3. import pkg. *
  4. Import pkg.*

3. import pkg.*

Q.15) Which of these keywords is used to define interfaces in Java?
  1. interface
  2. Interface
  3. intf
  4. Intf

1. interface

Q.16) Which of these keywords is used by a class to use an interface defined previously?
  1. import
  2. Import
  3. implements
  4. Implements

3. implements

Q.17) Which of these cannot be declared static?
  1. class
  2. object
  3. variable
  4. method

2. object

Q.18) Which of these keywords is not a part of exception handling?
  1. try
  2. finally
  3. thrown
  4. catch

3. thrown

Q.19) Which of the following classes can catch all exceptions which cannot be caught?
  1. RuntimeException
  2. Error 
  3. Exception
  4. ParentException

2. Error

Q.20) Which of the following handles the exception when a catch is not used?
  1. finally
  2. throw handler
  3. default handler 
  4. java run time system

3. default handler

Q.21) Which part of code gets executed whether exception is caught or not?
  1. finally
  2. try
  3. catch
  4. throw

1. finally

Q.22) Which of these exceptions handles the divide by zero error?
  1. ArithmeticException
  2. MathException
  3. IllegalAccessException
  4. None of these

1. ArthimeticException

Q.23) Which of these exceptions will occur if we try to access the index of an array beyond its length?
  1. ArithmeticException
  2. ArrayException
  3. ArrayIndexException
  4. ArrayIndexOutOfBoundsException

4. ArrayIndexOutOfBoundsException

Q.24) Which of these class is related to all the exceptions that cannot be caught?
  1. Error
  2. Exception
  3. RuntimeException
  4. All of these

2. Exception

Q.25) Which of the following is a correct constructor for thread?
  1. Thread(Runnable a, String str)
  2. Thread(int priority)
  3. Thread(Runnable a, int priority)
  4. Thread(Runntable a, Thread Group t )

1. Thread(Runnable a, String str)

Q.26) Which of the following will ensure the thread will be in running state?
  1. yield()
  2. notify()
  3. wait(0
  4. Thread.killThread()

3. wait()

Q.27) Which of these functions is called to display the output of an applet?
  1. display()
  2. paint()
  3. displayApplet()
  4. PrintApplet()

2. paint()

Q.28) Which of these methods is a part of Abstract Window Toolkit (AWD)?
  1. display () 
  2. paint() 
  3. drawString()
  4. transient()

2. paint()

Q.29) Which of these operators can be used to get run time information about an object?
  1. getInfo 
  2. Info 
  3. instanceof 
  4. getinfoof

3. instanceof

Q.30) When we invoke repaint() for a java.awt.Component object, the AWT invokes the method:
  1. (A) draw() 
  2. (B) update() 
  3. (C) showo ()
  4. (D) paint () 

B. update()

Q.31) Which is the container that doesn't contain title bar and MenuBars but it can have other components like button, textfield etc?
  1. (A) Window 
  2. (B) Frame 
  3. (C) Panel 
  4. (D) Container

C. Panel

Q.32) In Graphics class which method is used to draws a rectangle with the specified width and height?
  1. (A) public void drawRect(int x, int y, int width, int height) 
  2. (B) public abstract voidfilRect(int x, int y, int width, int height)
  3. (C) public abstract void drawLine(int x1, int y1, int x2, int y2)
  4. (D) public abstract void drawOval(int x, int y, int width, int height)

(A) public void drawRect(int x, int y, int width, int height)

Q.33) Which class is used for this Processing Method processActionEvent()?
  1. (A) Button,List,MenuItem 
  2. (B) Button,Checkbox,Choice 
  3. (C) Scrollbar,Component,Button
  4. (D) None of these)

 (A) Button,List,MenuItem

Q.34) Which method is called only once during the run time of your applet?
  1. (A) stop() 
  2. (B) paint() 
  3. (C) init() 
  4. (D) destroy()

(C) init()

Q.35) When an applet is terminated which of the following sequence of methods calls take the place?
  1. (A) stop(),paint(),destroy() 
  2. (B) destroy(),stop().paint()
  3. (C) destroy(),stop0 
  4. (D) stop(),destroy()

(D) stop(),destroy() 

Q.36) Which is a special type of program that is embedded in the webpage to generate the dynamic content?
  1. (A) Package
  2.  (B) Applet 
  3. (C) Browser 
  4. (D) None of these

(B) Applet

Q.37) Which of the following option leads to the portability and security of Java?
  1. (A) Bytecode is executed by JVM 
  2. (B) The applet makes the Java code secure and portable 
  3. (C) Use of exception handling 
  4. (D) Dynamic binding between objects

(A) Bytecode is executed by JVM

Q.38) What does the expression float a = 35 / 0 return?
  1. (A) 0 
  2. (B) Not a Number 
  3. (C) Infinity 
  4. (D) Run time exception

(C) Infinity

Q.39) How to sort an array?
  1. (A) Array-sort() 
  2. (B) Arrays.sort() 
  3. (C) Collection.sort() 
  4. (D) System.sort())

(B) Array.sort() 

Q.40) What is the process of defining a method in a subclass having same name & type signature as a method in its superclass?
  1. (A) Method overloading 
  2. (B) Method overriding 
  3. (C) Method hiding 
  4. (D) None of these

(B) Method overriding 

Q.41) Which of these keywords can be used to prevent Method overriding?
  1. (A) static 
  2. (B) constant 
  3. (C) protected 
  4. (D) final

(D) final

Q.42) Which of these is correct way of calling a constructor having no parameters, of superclass A by subclass B?
  1. (A) super(void);
  2. (B) superclass.(); 
  3. (C) super.A(); 
  4. (D) super();

(D) super(); 

Q.43) Which of this method can be used to make the main thread to be executed last among all the threads?
  1. (A) stop() 
  2. (B) sleep() 
  3. (C) join() 
  4. (D) call() 

(B) sleep() 

Q.44) What is the default value of priority variable MIN_PRIORITY AND _PRIORITY?
  1. (A) 0 & 256 
  2. (B) 0 & 1 
  3. (C) 1 & 10 
  4. (D) 1 & 256

(C) 1 & 10

Q.45) Which of these statement is incorrect?
  1. (A) A thread can be formed by implementing Runnable interface only 
  2. (B) A thread can be formed by a class that extends Thread class 
  3. (C) start() method is used to begin execution of the thread 
  4. (D) run() method is used to begin execution of a thread before start() method in special cases

(D)  run() method is used to begin execution of a thread before start() method in special cases

Q.46) Which of these method of Thread class is used to find out the priority given to a thread?
  1. (A) get() 
  2. (B) Thread Priority()
  3. (C) getPriority()
  4. (D) getThreadPriority() 

(C) getPriority()

Q.47) Which are passive controls that do not support any interaction with the user?
  1. (A) Choice 
  2. (B) List 
  3. (C) Labels 
  4. (D) Checkbox

(C) Labels

Q.48) The following way is used to create a frame is by creating the object of Frame class?
  1. (A) inheritance 
  2. (B) association 
  3. (C) Both A & B 
  4. (D) None of these

(B) association 

Q.49) Which of the following classes are derived from the Component class.
  1. (A) Container 
  2. (B) Window 
  3. (C) List 
  4. (D) Menultem

(C) List

Q.50) Which is the correct order of lifecycle in an applet?
  1. (A) Applet is started, initialized, painted, destroyed, stopped 
  2. (B) Applet is painted, started, stopped, initilaized, destroyed 
  3. (C) Applet is initialized,started,painted,stopped,destroyed 
  4. (D) None of these

(C) Applet is initialized,started,painted,stopped,destroyed

Post a Comment

Do not promote any link in the comment box, comment related to the blog or content.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.