DAY 20 & 21: Explanation of IDEs in Eclipse and Inheritance

What is IDEs Eclipse IDE is a free and open-source, Java-based integrated development environment (IDE) primarily used for developing Java applications, but also supporting other languages through plugins Open-Source and Free: Eclipse is developed and maintained by a community of developers and is available for free download and use. Java Development Focus: While versatile, Eclipse is renowned as a powerful IDE for Java development, offering features like language-aware editors, refactoring support, and integrated unit testing and debugging. What is IDEs in JAVA In the context of Java programming, an IDE (Integrated Development Environment) is a software application that provides a comprehensive environment for writing, building, testing, and debugging Java programs, all within a single interface What is JAR? JAR stands for Java Archive. It's a file format based on the popular ZIP file format and is used for aggregating many files into one. For internet war - Web Archive What is SRC in Java Eclipse? Whenever you make a project inside of Eclipse, Eclipse will auto-magically create a new folder in your workspace with the same name. Inside of that folder it will create two folders: bin, and SRC (source). The bin folder can be ignored. SRC to view .java files LIC to view .class files How to push git to eclipse Step 1 - git init Step 2 - git remote add origin step 3 - git add. step 4 - git commit -m step 5 - git push - set upstream origin master How to create branch in git step 1 - git branch mithra step 2 - git checkout mithra step 3 - git add. step 4 - git commit -m step 5 - git push -set upstream origin mithra Inheritance in JAVA Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a parent object. It is an important part of OOPs (Object Oriented programming system). What is inheritance Child object behave a parent object Keyword - Extends Inheritance in Java enables a class to inherit properties and actions from another class, called a superclass or parent class. A class derived from a superclass is called a subclass or child group. Through inheritance, a subclass can access members of its superclass (fields and methods), enforce reuse rules, and encourage hierarchy. Why use inheritance For Method Overriding (so runtime polymorphism can be achieved). For Code Reusability.(TBH) Methods Overriding If subclass (child class) has the same method as declared in the parent class, it is known as method overriding in Java. Usage of Java Method Overriding Method overriding is used to provide the specific implementation of a method that is already provided by its superclass. Method overriding is used for runtime polymorphism. Method overriding allows subclasses to reuse and build upon the functionality provided by their superclass, reducing redundancy and promoting modular code design. Subclasses can override methods to tailor them to their specific needs or to implement specialized behavior that is unique to the subclass. Method overriding enables dynamic method dispatch, where the actual method implementation to be executed is determined at runtime based on the type of object, supporting flexibility and polymorphic behavi Method overloading calc : Add(10,20), Add (10,20,30), Add (10,5,5f)

Apr 11, 2025 - 04:13
 0
DAY 20 & 21: Explanation of IDEs in Eclipse and Inheritance

What is IDEs
Eclipse IDE is a free and open-source, Java-based integrated development environment (IDE) primarily used for developing Java applications, but also supporting other languages through plugins

Open-Source and Free:
Eclipse is developed and maintained by a community of developers and is available for free download and use.

Java Development Focus:
While versatile, Eclipse is renowned as a powerful IDE for Java development, offering features like language-aware editors, refactoring support, and integrated unit testing and debugging.

What is IDEs in JAVA
In the context of Java programming, an IDE (Integrated Development Environment) is a software application that provides a comprehensive environment for writing, building, testing, and debugging Java programs, all within a single interface

What is JAR?
JAR stands for Java Archive. It's a file format based on the popular ZIP file format and is used for aggregating many files into one.

For internet war - Web Archive

What is SRC in Java Eclipse?

Whenever you make a project inside of Eclipse, Eclipse will auto-magically create a new folder in your workspace with the same name. Inside of that folder it will create two folders: bin, and SRC (source). The bin folder can be ignored.

SRC to view .java files
LIC to view .class files

How to push git to eclipse
Step 1 - git init
Step 2 - git remote add origin
step 3 - git add.
step 4 - git commit -m
step 5 - git push - set upstream origin master

How to create branch in git
step 1 - git branch mithra
step 2 - git checkout mithra
step 3 - git add.
step 4 - git commit -m
step 5 - git push -set upstream origin mithra

Inheritance in JAVA
Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a parent object. It is an important part of OOPs (Object Oriented programming system).

What is inheritance

Child object behave a parent object
Keyword - Extends

Inheritance in Java enables a class to inherit properties and actions from another class, called a superclass or parent class. A class derived from a superclass is called a subclass or child group. Through inheritance, a subclass can access members of its superclass (fields and methods), enforce reuse rules, and encourage hierarchy.

Why use inheritance

  1. For Method Overriding (so runtime polymorphism can be achieved).
  2. For Code Reusability.(TBH)

Methods Overriding
If subclass (child class) has the same method as declared in the parent class, it is known as method overriding in Java.

Usage of Java Method Overriding

  1. Method overriding is used to provide the specific implementation of a method that is already provided by its superclass.
  2. Method overriding is used for runtime polymorphism.
  3. Method overriding allows subclasses to reuse and build upon the functionality provided by their superclass, reducing redundancy and promoting modular code design.
  4. Subclasses can override methods to tailor them to their specific needs or to implement specialized behavior that is unique to the subclass.
  5. Method overriding enables dynamic method dispatch, where the actual method implementation to be executed is determined at runtime based on the type of object, supporting flexibility and polymorphic behavi

    Method overloading
    calc : Add(10,20), Add (10,20,30), Add (10,5,5f)