Category: 03. Object Class

  • this keyword in Java

    There can be a lot of usage of Java this keyword. In Java, this is a reference variable that refers to the current object. Usage of Java this keyword Here is given the 6 usage of java this keyword. Suggestion: If you are beginner to java, lookup only three usages of this keyword. 1) this: to refer current class…

  • Java static keyword

    The static keyword in Java is used for memory management mainly. We can apply static keyword with variables, methods, blocks and nested classes. The static keyword belongs to the class than an instance of the class. The static can be: 1) Java static variable If you declare any variable as static, it is known as a static variable. Advantages of static…

  • Constructors in Java

    In Java, a constructor is a block of codes similar to the method. It is called when an instance of the class is created. At the time of calling constructor, memory for the object is allocated in the memory. It is a special type of method which is used to initialize the object. Every time an object is…

  • Method in Java

    In general, a method is a way to perform some task. Similarly, the method in Java is a collection of instructions that performs a specific task. It provides the reusability of code. We can also easily modify code using methods. In this section, we will learn what is a method in Java, types of methods, method declaration, and how to call a method…

  • Objects and Classes in Java

    In this page, we will learn about Java objects and classes. In object-oriented programming technique, we design a program using objects and classes. An object in Java is the physical as well as a logical entity, whereas, a class in Java is a logical entity only. What is an object in Java An entity that…

  • Java Naming Convention

    Java naming convention is a rule to follow as you decide what to name your identifiers such as class, package, variable, constant, method, etc. But, it is not forced to follow. So, it is known as convention not rule. These conventions are suggested by several Java communities such as Sun Microsystems and Netscape. All the…

  • Java OOPs Concepts

    In this page, we will learn about the basics of OOPs. Object-Oriented Programming is a paradigm that provides many concepts, such as inheritance, data binding, polymorphism, etc. Simula is considered the first object-oriented programming language. The programming paradigm where everything is represented as an object is known as a truly object-oriented programming language. Smalltalk is considered the first truly object-oriented…