Section 1

Preview this deck

splice

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (8)

Section 1

(8 cards)

splice

Front

splice lets us remove any # of consecutive elemnts from anywhere in the array. To indicate which array you want to remove, we need to call the index. Ex: .splice(index #, 3 of elements to remove.)

Back

Creating your own methods..

Front

Remember, the program will always revert first to main.

Back

Different types of classes

Front

public: accessible in all class in your application. protected: accessible within the class in which it is defined and in its subclass(es) private: accessible only within the class in which it is defined. default (declared/defined without using any modifier) : accessible within same class and package within which its class is defined.

Back

to find the length of a string write .length

Front

variable name.length

Back

bracket notation is

Front

usin gzero based indexing to find the value of a certain character in a variable. ex: var = lastName[0];

Back

Ways to receive input..

Front

Integer.parseInt(args[0]);

Back

In java strings cannot be changed after being formed

Front

This means that.. var myStr = "Bob"; myStr[0] = "J"; will NOT change the name to Job. The only way to change the value would be to reassign the whole string. ex: myStr = "Job";

Back

Push, unshift, pop, shift.

Front

push() adds an element to the end of an array/ unshift() adds an element to the beginning of an array. pop() removes an element from the end of an array. shift() Removes an element from the beginning.

Back