[Java] Initialize, add, get

Array

Data type [] Array name = Data type [Number of elements];

Array.java


String[] aaa = new String[100];
aaa[0] = "Sentence";
String bbb = aaa[0];

list

List object name = new ArrayList <> ();

List.java


List<String> aaa = new ArrayList<>();
aaa.add("AA");
aaa.get(0);

map

Map <key type, value type> object name = new HashMap <> ();

Map.java


Map<Integer, String> aaa = new HashMap<>();
aaa.put(1, "Sentence");
aaa.get(1);

Postscript

No commentary needed, I forgot how to initialize it, so I'd like to move it for the time being because it's okay with texto .... For those times, I've listed only the simple ones so you don't get lost.

Recommended Posts

[Java] Initialize, add, get
Java (add2)
Java (add)
[Java] Get miscellaneous dates
java: Add date [Note]
Get EXIF information in Java
[Java] Get KClass in Java [Kotlin]
How to initialize Java array
[Java] Get Charset with Apathce Tika / Initialize String from Charset [Kotlin]
Add multi-letter watermark to Java Word
How to use Java HttpClient (Get)
Add, modify, delete JAVA PDF bookmarks
[Java] Declare and initialize an array
Add Bean Validation with Micronaut (Java)
Java
Add, replace, delete Java PDF images
Add watermark to Java to PDF document
[Java] Add WordArt to Word document
Get stuck in a Java primer
Java
Add / remove watermark to Java PowerPoint
Add index with Java8 Stream.map (tuple version)
[Java] Get List / Map elements with Iterator
[Java] Get the day of the specific day of the week
Get caller information from stack trace (java)
[Java] How to add data to List (add, addAll)
[Java] How to get the current directory
[Java] Get tag information from music files
Add Document to Azure Search Service (Java)
Inexperienced learning methods to get Java Silver 11
How to get the date in java
Get history from Zabbix server in Java
Add footnotes to Word documents in Java
Get Timestamp with Azure BlobStorage Java SDK
[Java8] Search the directory and get the file
[Java] Get the date with the LocalDateTime class
Add SameSite attribute to cookie in Java