Let’s talk about Java!

Let’s talk about Java!

Good things, by the way!

My first contact with java was a few years ago, and it was pretty superficial.

In the last week I had a lot of contact, all the exercises I've been doing to deepen my knowledge in OOP were performed with Java, and that changed a key in my head, why didn't I learn java before?

Look at the beauty of this code:

public class People {

    private String fullName;
    private String fathersName;
    private String mothersName;

    People(String fun, String fan, String mon) {
        fullName = fun;
        fathersName = fan;
        mothersName = mon;
    }
}

I know, this is pretty basic, but... This simple way is to start a class and add attributes to it and a constructor

The fact that it's strongly typed bothers me a little since other languages ​​like PHP where I've worked don't have this need.

As I said about PHP, there is some similarity for example as I inherit the attributes from another class to a new class, using the keyword "Extends"... example:

Public class Company extends People {

    private String nameCompany;
    private Int registerNumber;

  constructor(){
  //code
  }

}

I know this is a humble beginning with language! But this can give me the necessary foundation for other languages ​​and as I'm focusing a lot on OOP, design pattern, the syntax of the language will be the least of the problems.

Well that's it for today, if you like me are learning a programming language, leave your experience in a comment below, and always remember to leave positive comments, the internet is full of negative comments!

Hugs and see you soon!