Skip to content

GulcanC/java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‘‹ JAVA - OBJECT ORIENTED PROGRAMMING

๐ŸŒผ OBJECT: An Object is an entity that has a state and behavior, e.g., car, pen, table, etc. It can be physical or logical (tangible and intangible). An example of an intangible object is the banking system.

Characteristics of Object: State (Represents the data of an object). Behavior (Represents the behavior of an object such as deposit, withdraw, etc). Identity (It is used internally by the JVM to identify each object uniquely)

๐ŸŒผ CLASS: A class is a group of objects that have common properties. It is a template or blueprint from which objects are created. It is a logical entity. It canโ€™t be physical. Class in java can be fields, methods, constructors, blocks, nested class and interface.

๐ŸŒผ METHOD: A method is a way to perform some tasks. In Java, a method is a collection of instructions that perform a specific task. It provides the reusability of code.

Types of Method: Predefined, User-defined

Static Method: A method that belongs to a class rather than an instance of a class is known as a static method. We can create a static method by using the keyword static before the method name.

Instance Method: It is a non-static method defined in the class. Before calling or invoking the instance method, an object of its class must be created.

Abstract Method: A method that does not have a method body is known as an abstract method. The class must be abstract if it has an abstract method

๐ŸŒผ CONSTRUCTORS: In JAVA, a constructor is a block of codes similar to the method. At the time of calling the constructor, memory for the object is allocated in the memory. There are some rules defined for the constructor:

๐ŸŒผ INHERITANCE:

๐ŸŒผ Polymorphism

๐ŸŒผ Abstraction

๐ŸŒผ Encapsulation

๐ŸŒผ STATIC KEY WORD: The static keyword in Java is used mainly for memory management. We can apply static keyword with variables, methods, blocks, and nested classes. The static keyword belongs to the class rather than an instance of the class. The static can be variable or method.

๐Ÿ‘‹ PROJECT 1) BANK ACCOUNT APPLICATION

๐ŸŒผ Welcome message to user

๐ŸŒผ Deposit

๐ŸŒผ Withdraw

๐ŸŒผ Get previous transaction

๐ŸŒผ Show menu

๐ŸŒผ Execute our code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages