Example of HashMap (Array Pair Type)
This is an example of how to create a hashmap (Paired Array).
This is an example of how to create a hashmap (Paired Array).
This example shows how to create multiple scenes and switch between scenes in JavaFX. In JavaFX, an app can only have one stage but that stage can have 1 or more scenes….
Example of Parsing JSON from URL where JSON contains an Array (phoneNUmbers). The data is on ID 57 but shown below: { “firstName”: “John”, “lastName”: “Smith”, “age”: 25, “address”: { “streetAddress”: “21…
This example shows how to read a JSON file from a URL using BufferedReader() then place that to a string, then parse that string to extract data by creating a JSONObject.
The Java-Json.jar had to be part of the libraries in order to parse JSON in this example. Other References: Info on Reader: https://www.javatpoint.com/java-reader-class Info on StringBuilder: StringBuilder: https://docs.oracle.com/javase/tutorial/java/data/buffers.html
This example shows how to read a file from a URL using Reader class. Reference: Alexander, Alvin (2016). How to open and read from a URL in Java (with just the URL…
Example of Sorting Arrays in Java. Had a hard time using a function in that you cannot retrieve data stored in an array from withina function. Had to utilize a FOR loop…
This is an example of a Java Program using two. JAVA files (classes). One file is Main.java and the other is Car.java. The code for each class/file is shown.