📜  java make object - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:21.336000             🧑  作者: Mango

代码示例2
Objects: came from class, we can create multiple objects from a class
  ArrayList<>  list     =  new ArrayList<>();
  Class     refName               OBJECT
  
 each object has its own copy of instance variable
· declared outside the blocks or methods
Object: Instance of the class. We can store different data's to objects
Object Creation: with new keyword.     
  ClassName obj = new ExistingConstructor;