WorksheetsOOP_Viva_S3CSEGamma
Total questions: 20
Worksheet time: 3600secs
Explain the role of the Java Virtual Machine (JVM) in executing a Java program
What are Java Buzzwords? Mention any four.
Write the general structure of a Java program and mark the main method.
Give a short code showing if–else if ladder in Java.
How do you declare and initialize a two-dimensional array in Java?
Define a class and an object with a small example.
Explain method overriding with an example hierarchy.
How do you write data to a file using FileWriter?
Differentiate between checked and unchecked exceptions.
What happens when an exception is not caught?
Write a code snippet to find length of a string and reverse it.
Differentiate between String and StringBuffer classes.
How can you compare two strings ignoring case?
Show an example of searching for a substring inside a string.
What is a thread? How do you create a thread by extending Thread?
Show minimal code of a JavaFX application class with start() method.
How do you create a form with text fields and button in JavaFX?
What are the steps to connect Java to a database using JDBC?
Write a code fragment to insert a record into a database table.
How do you retrieve data using SELECT query in JDBC?
