COMP-202--midterm-exam--2010-03--appendix - COMP-202B...

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

View Full Document Right Arrow Icon
COMP-202B - Winter 2010 - Midterm Examination - Appendix Page 1 SUMMARY OF JAVA STANDARD LIBRARY METHODS FOR SELECTED CLASSES String (package java.lang ) Methods: public boolean equals(Object anObject) : Compares this String to anObject . public boolean equalsIgnoreCase(String anotherString) : Compares, ignoring case consider- ations, this String to anotherString . public int compareTo(String anotherString) : Compares this String to anotherString lexi- cographically. public int compareToIgnoreCase(String anotherString) : Compares, ignoring case considera- tions, this String to anotherString lexicographically. public char[] toCharArray() : Converts this String to a new character array. Scanner (package java.util ) Methods: public Scanner(InputStream source) : Constructs a new Scanner that produces values scanned from the specified input stream. public double nextDouble() : Scans the next token of the input as a double . public int nextInt() : Scans the next token of the input as an int . public String nextLine() : Advances this Scanner past the current line and returns the input read. public int nextLong()
Background image of page 1

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

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

This note was uploaded on 10/16/2010 for the course COMP 202 taught by Professor Verbrugge during the Winter '07 term at McGill.

Page1 / 2

COMP-202--midterm-exam--2010-03--appendix - COMP-202B...

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