Skip to content

Completed Derusting#7

Open
mechance782 wants to merge 11 commits intoauberonedu:mainfrom
mechance782:main
Open

Completed Derusting#7
mechance782 wants to merge 11 commits intoauberonedu:mainfrom
mechance782:main

Conversation

@mechance782
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Owner

@auberonedu auberonedu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

Comment thread src/ListPractice.java
public static void main(String[] args) {
// Create an empty ArrayList of Strings and assign it to a variable of type List

List<String> myList = new ArrayList<String>();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but you can make it a bit simpler with type inference (omitting the type parameter for the constructor):

List<String> myList = new ArrayList<>();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants