Latest blog on category "Java" by Royce Roy

  • A local class without a name is called an anonymous class. If we need only a single instance of a local class, we will create an anonymous class. Typically, a local class has a name and thus a declaration....

 1016 View(s)
  • A non-static class defined within a class is called a member class of the enclosing class. A member class is commonly used as a helper class to the enclosing class....

 952 View(s)
 2061 View(s)
  • Another big concept associated with object-oriented programming is encapsulation. Every class contains some data in its fields. We hide these fields by declaring them private. We define getter/setter methods to access them....

 1206 View(s)
 1992 View(s)