Java Advance Go Back Working with Methods and Encapsulation views 10:33 So far we have seen the use of class to encapsulate the “main” method. In Java, it is very important to realize that the classes in Java define a new data type. The reason behind this is that if you define a class, then it can be used to create an object. It is well known fact that a class defined in Java serves as a template for a n object. And the object is an instance of a class. So let us understand the structure of the class. The class in Java is declared with the keyword “class”. Create if and if/else constructs Using a switch statement Creating and Using Arrays Multidimensional Array Using Loop constructs Creating and using Do/While loops Working with Methods and Encapsulation Assignment of Object referance variables Arguments and Parameters Applying static keywords to methods and fields Defualt constructor and User defined constructor Applying access modifiers Applying encapsulation principles to a class