CS notes 1

CS notes 1 - However when declaring an object you have to...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
First Class Wednesday, January 19, 2011 3:20 PM Grading Assignments 45% Recitation pop quizzes 5% Midterm 20% Final 30% Midterm- Sunday March 6 4-6 PM http://remus.rutgers.edu/cs112/ Need at least an 80% for an A Linked Lists Wednesday, January 19, 2011 3:34 PM Impossible to try and predict all the possible ways people will used linked lists Genereric Structure Accomadates any data type To make generic, add <T> right after node class name T is a generic type Java documentation uses E Do not use <T> in constructor
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: However, when declaring an object, you have to use <T> LinkedList declaration exactly the same as ArrayLists LinkedList<Integer> llint = new LinkedList<Integer>(); toString Method StringBuilder(); .append(string) - add items This allows you to create only 1 string while still adding items Simply adding to a string will create a new string every time Must return sb.toString() at the end NOTE: Single quote for characters, double quote for strings!...
View Full Document

This note was uploaded on 02/29/2012 for the course 198 112 taught by Professor Venugopal during the Spring '09 term at Rutgers.

Page1 / 2

CS notes 1 - However when declaring an object you have to...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online