Java Quick Reference

0.0(0)
studied byStudied by 7 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

flashcard set

Earn XP

Description and Tags

Java Quick Reference Sheet

Last updated 4:46 PM on 9/2/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

24 Terms

1
New cards

String(String str)

Constructs a new String object that represents the same sequence of characters as str

2
New cards

int length()

Returns the number of characters in a String object

3
New cards

String substring(int from, int to)

Returns the substring beginning at index from and ending at index to - 1

4
New cards

String substring(int from)

Returns substring(from, length())

5
New cards

int indexOf(String str)

Returns the index of the first occurrence of str; returns -1 if not found

6
New cards

boolean equals(String other)

Returns true if this is equal to other; returns false otherwise

7
New cards

int compareTo(String other)

Returns a value <0 if this is less than other; returns zero if this is equal to other; returns a value >0 if this is greater than other

8
New cards

Integer(int value)

Constructs a new Integer object that represents the specified int value

9
New cards

Integer.MIN_VALUE

The minimum value represented by an int or Integer

10
New cards

Integer.MAX_VALUE

The maximum value represented by an int or Integer

11
New cards

int intValue()

Returns the value of this Integer int

12
New cards

Double(double value)

Constructs a new Double object that represents the specified double value

13
New cards

double doubleValue()

Returns the value of this Double as a double

14
New cards

static int abs(int x)

Returns the absolute value of an int value

15
New cards

static double abs(double x)

Returns the absolute value of a double value

16
New cards

static double pow(double base, double exponent)

Returns the value of the first parameter raised to the power of the second parameter

17
New cards

static double sqrt(double x)

Returns the positive square root of a double value

18
New cards

static double random()

Returns a double value greater than or equal to 0.0 and less than 1.0

19
New cards

int size()

Returns the number of elements in the list

20
New cards

boolean add(E obj)

Appends obj to end of list; returns true

21
New cards

void add(int index, E obj)

Inserts obj at position index (0 <= index <= size), moving elements at position index and higher to the right (adds 1 to their indices) and adds 1 to size

22
New cards

E get(int index)

Returns the element at position index in the list

23
New cards

E set(int index, E obj)

Replaces the element at position index with obj; returns the element formerly at position index

24
New cards

E remove(int index)

Removes element from position index, moving elements at position index + 1 and higher to the left (subtracts 1 from their indices) and subtracts 1 from size; returns the element formerly at position index

Explore top notes

note
A Tour of the Cell
Updated 1292d ago
0.0(0)
note
Specific Latent Heat
Updated 1244d ago
0.0(0)
note
Ch.6
Updated 1267d ago
0.0(0)
note
The Greek World
Updated 984d ago
0.0(0)
note
Unit 5 The Enlightenment
Updated 304d ago
0.0(0)
note
Unit 9: The Pacific, 700-1980 CE
Updated 1066d ago
0.0(0)
note
A Tour of the Cell
Updated 1292d ago
0.0(0)
note
Specific Latent Heat
Updated 1244d ago
0.0(0)
note
Ch.6
Updated 1267d ago
0.0(0)
note
The Greek World
Updated 984d ago
0.0(0)
note
Unit 5 The Enlightenment
Updated 304d ago
0.0(0)
note
Unit 9: The Pacific, 700-1980 CE
Updated 1066d ago
0.0(0)

Explore top flashcards

flashcards
NEURAL TISSUE AND BRAIN- JONES
67
Updated 293d ago
0.0(0)
flashcards
AP Government Unit 1
48
Updated 671d ago
0.0(0)
flashcards
Section 3 - Caesar Vocab
31
Updated 912d ago
0.0(0)
flashcards
Comp and Lit Semester 1 Final
26
Updated 1141d ago
0.0(0)
flashcards
Vocab 6
35
Updated 1152d ago
0.0(0)
flashcards
clinical psychology
733
Updated 229d ago
0.0(0)
flashcards
NEURAL TISSUE AND BRAIN- JONES
67
Updated 293d ago
0.0(0)
flashcards
AP Government Unit 1
48
Updated 671d ago
0.0(0)
flashcards
Section 3 - Caesar Vocab
31
Updated 912d ago
0.0(0)
flashcards
Comp and Lit Semester 1 Final
26
Updated 1141d ago
0.0(0)
flashcards
Vocab 6
35
Updated 1152d ago
0.0(0)
flashcards
clinical psychology
733
Updated 229d ago
0.0(0)