Skip to content

Completed Java Derusting Assignment#2

Open
mmaslov007 wants to merge 10 commits intoauberonedu:mainfrom
mmaslov007:main
Open

Completed Java Derusting Assignment#2
mmaslov007 wants to merge 10 commits intoauberonedu:mainfrom
mmaslov007:main

Conversation

@mmaslov007
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! See comments below.

Comment thread src/ListPractice.java Outdated

public static void main(String[] args) {
// Create an empty ArrayList of Strings and assign it to a variable of type List
ArrayList<String> stringList = 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.

Remember to use interface types (List)

Comment thread src/MapPractice.java
Comment on lines +46 to +48
for (String key : hashMap.keySet()) {
System.out.println(key + ", " + hashMap.get(key));
}
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! Can you find another way to do it that loops over the entries directly?

Comment thread src/StringPractice.java Outdated
System.out.println("\n");

// Create an ArrayList of Strings and assign it to a variable
ArrayList<String> stringList = 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.

Remember to use interface types (List)

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