Skip to content

Done! #4

Open
brittLiban wants to merge 7 commits intoauberonedu:mainfrom
brittLiban:main
Open

Done! #4
brittLiban wants to merge 7 commits intoauberonedu:mainfrom
brittLiban:main

Conversation

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

ArrayList arraylist = new ArrayList();
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.

Here and in the other Collections exercises remember to use interface types and generics, e.g.

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

Comment thread src/StringPractice.java
Comment on lines +33 to +37
StringBuilder newString = new StringBuilder();

for (Object word : newAList) {
newString.append(word);
}
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 is better than naive string concatenation, but can you find a method that lets you do it without any loop?

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