The keyword ________ is used to skip the rest of the current loop iteration.
- break
- continue
- exit
- return
In Java, the continue keyword is used to skip the rest of the current loop iteration and move to the next iteration. It is often used in loops like for and while when certain conditions are met, and you want to skip the current iteration and continue with the next one. The other options do not serve this purpose.
Loading...
Related Quiz
- ________ is an interface providing thread safety without introducing concurrency overhead for each individual read/write operation.
- Consider a scenario where you have to develop a JavaFX application that should adapt to different screen sizes. How would you approach the design and layout to ensure that the application is responsive and the UI adjusts dynamically?
- When using a single-thread executor, what happens if a submitted task throws an exception?
- Consider a scenario where a superclass method that throws an exception is overridden in the subclass. How should the exception handling be approached in this case, ensuring that the application's robustness is maintained?
- The method read() of FileReader class returns ________ when the end of the file is reached.