java programming cheatsheet

Post on 27-Nov-2015

166 Views

Category:

Documents

17 Downloads

Preview:

Click to see full reader

DESCRIPTION

Java Crib Sheet

TRANSCRIPT

5/20/11 11:15 AMJava Programming Cheatsheet

Page 1 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Search booksite...

APPENDIX D: JAVA PROGRAMMING CHEATSHEET

This appendix summarizes the most commonly-used Java languagefeatures in the textbook. Here are the APIs of the most commonlibraries.

Hello, World.

Editing, compiling, and executing.

Built-in data types.

Declaration and assignment statements.

INTRO TO PROGRAMMING

1. Elements ofProgramming

2. Functions

3. OOP

4. Data Structures

INTRO TO CS0. Prologue

5. A Computing Machine

6. Building a Computer

7. Theory of Computation

8. Systems

9. Scientific Computation

ALGORITHMS, 4TH EDITION

WEB RESOURCES

FAQ

Data

Code

Errata

Appendices

Lecture Slides

Programming Assignments

5/20/11 11:15 AMJava Programming Cheatsheet

Page 2 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Integers.

Floating-point numbers.

Booleans.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 3 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Comparison operators.

Parsing command-line arguments.

Math library.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 4 of 18http://introcs.cs.princeton.edu/11cheatsheet/

The full Math API.

Type conversion.

If and if-else statements.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 5 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Nested if-else statement.

While and for loops.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 6 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Break statement.

Do-while loop.

Switch statement.

Arrays.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 7 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Compile-time initialization.

Typical array-processing code.

Two-dimensional arrays.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 8 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Compile-time initialization.

Ragged arrays.

Our standard output library.

The full StdOut API.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 9 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Our standard input library.

The full StdIn API.

Our standard drawing library.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 10 of 18http://introcs.cs.princeton.edu/11cheatsheet/

The full StdDraw API.

Our standard audio library.

The full StdAudio API.

Redirection and piping.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 11 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Functions.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 12 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Libraries of functions.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 13 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Our standard random library.

Our standard statistics library.

Using an object.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 14 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Creating an object.

Instance variables.

Constructors.

Instance methods.

Classes.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 15 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Object-oriented libraries.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 16 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Java's String data type.

The full String API.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 17 of 18http://introcs.cs.princeton.edu/11cheatsheet/

Java's Color data type.

The full Color API.

Our input library.

The full In API.

Our output library.

5/20/11 11:15 AMJava Programming Cheatsheet

Page 18 of 18http://introcs.cs.princeton.edu/11cheatsheet/

The full Out API.

Our picture library.

The full Picture API.

Compile-time and run-time errors. Here's a list of errorscompiled by Mordechai Ben-Ari. It includes a list of common errormessage and typical mistakes that give rise to them.

Copyright © 2000–2011 by Robert Sedgewick and Kevin Wayne. All rights reserved.

top related