Java Programming and Operating Systems Fundamentals
This test covers fundamental concepts in Java programming (including OOP, design patterns, multithreading, and JDBC) and operating systems (including memory management, virtual memory, and system tasks). Also includes basic networking and database concepts.
Questions
What of the following statements is/are true about virtual memory in operating system?
- Virtual memory occupies space in secondary storage.
- There is a lazy swapper used in demand paging.
- Demand paging causes processor overhead.
- Demand paging causes page-fault trap in memory.
- All of the above
Which of the following statements is/are not true in thrashing in operating system?
- When the process is taking more time in paging than execution, thrashing occurs.
- Thrashing occurs when the processor takes more time in execution than paging.
- Thrashing is the cause of inordinate page-fault rate.
- Thrashing causes low CPU utilisation.
- Both (2) and (4)
Which of the following is/are the task(s) of the operating system?
- Memory management
- Device management
- Providing user interface
- All of the above
- Only (1) and (3)
Which of the following statements is/are true in operating system?
- Segmentation divides the memory in to various sizes called segments.
- In paging, memory is divided into small partitioned page frames.
- In paging, the operating system reads data in secondary memory by fixed size frames.
- All of the above
- Only (2) and (3)
Which of the following statements is/are false about String class in java?
- String is a final class in java.
- String class is mutable.
- String class is thread-safe in java.
- None of the above
- Only (2) and (3)
Which of the following statements is/are true?
- JVM (Java Virtual Machine) is platform independent.
- Java is platform independent language.
- JRE (Java Runtime System) consists of set of libraries that JVM uses at runtime.
- All of the above
- Only (2) and (3)
Which of the following JDBC (Java database Connectivity) drivers is known as Database-Protocol Driver?
- Type-1 driver
- Type-2 driver
- Type-3 driver
- Type-4 driver
- None of the above
Which of the following is/are the example(s) of Wide Area Network?
- Travel booking system
- World Wide Web
- ATM banking system
- All of the above
- Only (1) and (2)
Which of the following is not supported by java language?
- Abstraction
- Encapsulation
- Multiple inheritance
- Polymorphism
- None of the above
Which of the following statements is/are true?
- Singleton design pattern is a creation design pattern in java.
- There can be only one instance that can be created in a singleton design pattern in java.
- We cannot make the subclass of the Singleton class.
- All of the above
- Only (1) and (2)
If there are two interfaces having the same method with different return types in a java code and if a class is going to implement the both interfaces, then what will be the output of the code?
- It will give compile time error.
- Code will compile.
- The method in the first interface will be executed.
- The method in the second interface will be executed.
- None of the above
What is the role of volatile keyword in java?
- Volatile keyword is used to achieve synchronization in java.
- Volatile keyword determines that the volatile variable reads the value form the main memory only.
- Volatile variable is used in a multithreading environment.
- All of the above
- Only (2) and (3)
What is the role of protected specifier in java?
- The member of the class can be accessed inside the same package as well as in the subclass of the class in other package.
- The member can be accessed only in the same package.
- Members can be accessed inside the particular class only.
- Members can be accessed everywhere outside the class as well as in the other packages too.
- None of the above
Which of the following is a DDL (Data Definition Language) command in database?
- Create
- Alter
- Drop
- Delete
- Only (1), (2), and (3)
Which of the following types of resultset does not reflect any change in the database tables?
- Forward-only
- Scroll-insensitive
- Scroll-sensitive
- Both (1) and (2)
- None of the above