Previously you must have understood what it is to understand the array of variables easier. So, like this simple example: When you want to store a data that an instance name, of course, you need to declare a variable to be able to store data such name. Unfortunately you do not always deal with one data, now you imagine if you want to list the names of students in your class. Please note: a regular variable can only store one value. Then, if you will create a variable name1, name2, name3, and so on? Of course not, this is why you need an array data type. Because of the array allows you to store a lot of data in a variable. Below is a simple example of the use of java for an array of one-dimensional and two-dimensional array number specified by input. Example 1 dimensional array java program: import java.util. *; class input_Array1 { public static void main (String [] xxx) { try { int arr [] = new int [4]; String array [] = new String [4]; Scan...
Website Pembelajaran Pemrograman dan Info Game Terupdate