reading-notes

https://mrobeidat.github.io/reading-notes/


HTML TABLE

A table is an arrangement of data in rows and columns, or possibly in a more complex structure. … Tables are useful for various tasks such as presenting text information and numerical data. Tables can be used to compare two or more items in tabular form layout. Tables are used to create databases


functions, Methods, and Objects

first, what is function ?

Function — a set of instructions that perform a task. Method — a set of instructions that are associated with an object.

Everything in Java is associated with classes and objects, along with its attributes and methods. For example: in real life, a car is an object. The car has attributes, such as weight and color, and methods, such as drive and brake.

A Class is like an object constructor, or a “blueprint” for creating objects.

Create an Object!

In Java, an object is created from a class. We have already created the class named Main, so now we can use this to create objects.

To create an object of Main, specify the class name, followed by the object name, and use the keyword new.

![](https://image.slidesharecdn.com/objectorientedjavascript-150308120703-conversion-gate01/95/objectoriented-javascript-11-638.jpg?cb=1425816709

Using Multiple Classes

You can also create an object of a class and access it in another class. This is often used for better organization of classes (one class has all the attributes and methods, while the other class holds the main() method (code to be executed)).

Remember that the name of the java file should match the class name. In this example, we have created two files in the same directory/folder:

(Main.java Second.java)

.