Appendix A: Test Your Skill in Language Fundamentals

Before you jump into object-oriented programming in Java, let’s review the language’s fundamentals. This section is added to help you to better understand the discussions in the book. You can learn the advanced topics easily if you know these core concepts. In this appendix, you will see many code segments and I’m asking you to predict the output. Still, I am keeping the supportive comments in many places for your easy understanding.


1.1 What will be the output?
package java2e.appendixa.set1;
class Q1 {
      static public void main(String[] args) {
            System.out .println("Hello World.");
Hello World.
You can see that you can change the order. Instead of ...

Get Interactive Object-Oriented Programming in Java: Learn and Test Your Programming Skills now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.