Notice: Function WP_Block_Type_Registry::register was called incorrectly. Block type "core/video" is already registered. Please see Debugging in WordPress for more information. (This message was added in version 5.0.0.) in /var/www/html/blog_tech/wp-includes/functions.php on line 6121
Java | Java – Aron's Tech Blog

Category Archives: Java

Java

Java classes

public void addFriend(Person friend);

Public signifies that the class is going to be public and called.

Void means that it will not return a value but do something.

addFriend is the name.

Person and friend are the items passed when it’s void.

If the class is going to return something declare the variable type it will return:
public String getFriends();

Instance variables:

private [type] [name]