Programming in Java
String and StringBuilder
Unlike many other languages that implement strings as character arrays, Java
implements strings as objects of type String.
Advantage of creating strings as objects is that String objects can be
Declaring and using ArrayList class
An array is a group/collection of variables of the
same type that are referred to by a common name.
Arrays of any type can be created and
What is a Graph?
A graph G = (V,E) is composed of:
V: set of vertices
E: set of edges connecting the vertices in V
An edge e = (u,v) is a pair of vertices
Graph, Directed Graph
If a weight is associated with each
public class TestMap
public static void main(String args)
/ Create a HashMap
Map <String, Integer> hashMap = new HashMap <String, Integer>();