Translate

Monday, March 30, 2020

Ways to create Object in java, Features, Conventions of java and Compilation Process

Features of Java

  1. Object Oriented 
  2. Simple
  3. Secured
  4. Platform independent 
  5. Robust 
  6. Portal
  7. Architecture Neutral
  8. Dynamic
  9. Interpreted
  10. High Performance
  11. Multi threaded
  12. Distributed
Convention of Java
  1. Class Name should be start with upper latter example Test
  2. Variable should in lower case
  3. Method should be begins with Camel case lower case the upper case 
  4. Package name should be lower letter
  5. Constant should be like :- SIZE 50


Compilation

  1.  Download J.D.K and Install J.D.K in 💻
  2.  Set Path
  3. Write program in NotePad 
  4. Save program with .java extension
  5. Compile program in command prompt Example javac ClassName.java 
  6. Execute program in command prompt Example java ClassName
Ways to create object in JAVA 
  1. New Keyword  
  2. Instance factory method
  3. static factory method
  4. pattern factory method 
  5. new instance method
  6. clone() method.

1 comment:

Constructor in Java

Rules of Constructor Class name and constructor name must be same Constructor is able to take parameters Constructor is not allowed re...