[JAVA] List of beginners (List) memo

I decided to use ListView to solve the problem that I can only display the array of previous memos one by one. So, I first investigated what a List is. To summarize briefly Lists can basically store values in the same way as arrays, but unlike arrays, you can easily insert, change, and delete values after storing them. Also, ListView can display all the elements in List, so you can use it if you just want to display it. And is it compatible with arrays? It's very easy to change from array to list and from list to array type. But if you are new to programming, you need to be careful. , When I changed the contents from the array to List and tried to display it in ListView, I found that if there was a Null value </ strong> in that List, the app would stop without exception. No, I may be the only one who makes such a mistake, but if the application stops at the part using ListView, check if there is a null value in the List with System.out.println (); I want you to. If there is a Null value, that may be the cause of the app stopping. If a Null value is included, it may work properly if you remove it with an If statement. As mentioned above, it was super rudimentary and I could not find it even if I searched. (Maybe I was just not good at searching)


It seems that NULL is included in the initial value of the uninitialized array, so be careful.

Initialization, important

Recommended Posts

List of beginners (List) memo
List of MySQL sentences for programming beginners * Personal memo
RxJava Beginner's Recommendation of RxJava
[Memo] Java Linked List
List of frequently used Java instructions (for beginners and beginners)
[Java] Beginner's understanding of Servlet-②
Execution result memo of String.substring
[Java] Beginner's understanding of Servlet-①
[Ruby] List of basic commands
List of hosts file locations
[Java] Delete the elements of List
Enumeration of combination patterns using List
[For beginners] Summary of java constructor
[Rails] List instances of multiple models
[Rails] Introduction of Rubocop by beginners
Sort a List of Java objects
Official logo list of the service
List of members added in Java 9
Java beginner's stumbling block [memo writing]
micronaut document table of contents memo
List of types added in Java 9
List of alternative distributions for CentOS
nft command memo of nf_tables (CentOS8)
Gem list of each ruby version 2.5.x
Introduction memo of automatic test using Jenkins
Summary of Docker understanding by beginners ② ~ docker-compose ~
List of point cuts for making finer point cuts
Rails [For beginners] Implementation of comment function
List of recommended articles related to Corda
List of methods used when manipulating strings
List of download destinations for oracle java
How to sort the List of SelectItem
Explanation of Ruby on rails for beginners ①
Ability to display a list of products
[Java] Contents of Collection interface and List interface