Posts

Showing posts with the label Java tutorials

๐Ÿ˜ฎ๐Ÿ˜ฎ DAY 4- FEATURES OF JAVA ๐Ÿ˜ฎ๐Ÿ˜ฎ

Image
  Yho Codestars!  It's day 4 and I have studied for a couple hours today, I feel overloaded but you know what the goal is? -- FULL STACK JAVA DEVELOPER IN 6months ๐Ÿ˜‰ ๐Ÿ˜Š.  Let's get started! JAVA is an Object-Oriented Programming Langauge (OOP) . OOP has 4 features. ABSTRACTION: The main purpose of abstraction as the name implies to hide unnecessary data which helps to reduce the complexity of a program and only display needed information. ENCAPSULATION: This feature helps to hide sensitive data from users. It increases security, allows flexibility, and increases the control of methods and class attributes. The structure of the objects and implementation of the methods are hidden from the user. INHERITANCE: This feature allows one class to inherit the feature of another class (includes fields and methods). The class with the inherited feature is called the SUPER CLASS / PARENT CLASS. The class that inherited features from another class is called the SUB CLASS / CHILD CL...

๐ŸŽฏ๐ŸŽฏ DAY 3- INTRODUCTION TO JAVA (II) ๐ŸŽฏ๐ŸŽฏ

Image
Yho Codestars!  It's day 3 and I still feel quite energetic๐Ÿ‘ถ . So here is what I learned today, feel free to comment and follow my blog๐Ÿ˜ . Today's JAVA lesson! The basic element of Java:  Java has 3 basic elements; Class, Interface, and Enum. We can only write a java program with the aid of these 3 elements, without class and interface, there is no Java program. Syntax of the basic elements: Syntax is a set of rules we need to follow when writing a program. Class <Acess modifier> class <class name> { } Interface <Acess modifier> interface < interface name> { } Enum <Acess modifier> enum < enum name> { } Access modifiers provide access restrictions to a class. There are 4 types of access modifiers; Public Private  protected  Default We cannot declare a Java class as private, or protected, the same goes for interface and enum. Examples of the basic element's syntax:      The example in the fi...