Internshala Core - Java
Internshala Core - Java
Summer training
Sourabh_Pathak
ROADMAP
• Object is a thing
• An object has state, behavior and identity
• Internal variable: store state
• Method: produce behavior
• Unique address in memory: identity
• Declaration
• int[] arr;
• Person[] persons;
• Also support: int arr[]; Person persons[]; (confusing, should be avoided)
• Creation
• int[] arr = new int[1024];
• int [][] arr = { {1,2,3}, {4,5,6} };
• Person[] persons = new Person[50];
GARBAGE COLLECTOR
• In C++, you have to make sure that you destroy the objects when you
are done with them.
• Otherwise, memory leak.
CERTIFICATE
PROJECT-CONNECT FOUR GAME