RRB JE Stage II : Computer Science & IT Quiz | 16th August 2019

Dear Aspirants,

RRB JE Stage II exam is scheduled to be conducted from 28th August to 1st September 2019. The overall merit for the selection will be made on the basis of the marks scored in stage II, so candidates need to prepare thoroughly for the second stage. To help the aspirants, Adda247 has come up with a study plan in which we will provide you daily quizzes of all technical subjects. The below quiz will be helpful for the candidates who opted the exam group Computer Science & IT in RRB JE stage II. 

Q1. Predict the output of the following Java program.
class Test {
public static void main(String[] args) {
for(int i = 0; 0; i++)
(b)Compiler Error
(c)Runtime Error

S1. Ans.(b)
Sol. The error is in for loop where 0 is used in place of Boolean value. Unlike C++, use of non boolean variables in place of bool is not allowed

Q2. Which of these is a super class of all errors and exceptions in the Java language?
(d)None of the above

Sol. The java.lang.Throwable class is the superclass of all errors and exceptions in the Java language. Only objects that are instances of this class (or one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java throw statement.

Q3. Which of the following is used to compile, debug and execute java program?
(a) JDK
(b) JIT
(c) JVM
(d) JRE

Sol. JDK stands for Java Development Kit. It’s a superset of JRE. The JDK includes the JRE plus command-line development tools such as compilers (javac) and debuggers (jdb) and others (jar, javadoc, etc) that are necessary or useful for developing applets and applications.

Q4. Which of the following is the extension of compiled java classes?
(a) .java
(b) .jng
(c) .jas
(d) .class


Q5. Which of the following algorithm gives the best performance, If the given input array is sorted or nearly sorted?
(a)Selection sort
(b)Bubble sort
(c)Insertion sort
(d)Merge sort

S5. Ans.(c)
Sol. Insertion sort is used when number of elements is small. It can also be useful when input array is almost sorted, only few elements are misplaced in complete big array.

Q6. Which of the following is true with respect of class and inheritance in Java?
(a) “X extends Y” is correct if and only if X is a class and Y is an interface.
(b) “X extends Y” is correct if and only if X is a interface and Y is a class.
(c) “X extends Y” is correct if X and Y are either both classes or both interface.
(d) “X extends Y” is correct for all combinations of X and Y being classes and/or interfaces.

S6. Ans.(c)

Q7. What is the use of super keyword in Java?
(c) to refer to current class object
(b) to refer to immediate parent class of a class
(a) to refer to immediate child class of a class
(d) to refer to static member of parent class

S7. Ans.(b)
Sol. super can be used to refer immediate parent class instance variable. super can be used to invoke immediate parent class method. super() can be used to invoke immediate parent class constructor.

Q8. Round Robin(RR) scheduling algorithm is suitable for which type of operating system?
(a) Real Time Operating Systems
(b) Embedded Operating Systems
(c) Distributed Operating Systems
(d) Time Sharing Operating Systems

S8. Ans.(d)
Sol. Round Robin is the preemptive process scheduling algorithm. Each process is provided a fix time to execute, it is called a quantum. Once a process is executed for a given time period, it is preempted and other process executes for a given time period. Context switching is used to save states of preempted processes.

Q9. Multiple inheritance is not supported in Java because?
(a) To remove ambiguity and provide more maintainable and clear design.
(b) Java is a Object oriented language.
(c) Multiple inheritance is not an important feature.
(d) None of these

S9. Ans.(a)
Sol. Java doesn’t allow multiple inheritance to avoid the ambiguity caused by it

Q10. Which of the following converts user-friendly names to IP addresses?
(a) PING
(b) Domain Name System
(c) DHCP

S10. Ans.(b)
Sol. The domain name system (DNS) is the way that internet domain names are located and translated into internet protocol (IP) addresses. The domain name system maps the name people use to locate a website to the IP address that a computer uses to locate a website.

Register for RRB JE CBT Stage II Free Study Material

You may also like to read: