0 оценок0% нашли этот документ полезным (0 голосов)
100 просмотров11 страниц
The document contains four mock exam questions on various Java programming concepts:
1. Loops in Java, with examples of counting and conditional loops. A program to print a pattern using loops.
2. Designing a Forest simulation class in Java. The class must represent a forest grid, get the initial state, display the state, update the state based on rules, and run the simulation for a specified number of generations.
3. Object-oriented concepts of inheritance and polymorphism. Payroll system example using inheritance for salaried and hourly workers.
4. Java exceptions - difference between exceptions and errors. Exception handling flow. Finite stack class using exceptions.
The document contains four mock exam questions on various Java programming concepts:
1. Loops in Java, with examples of counting and conditional loops. A program to print a pattern using lo…