using classes and objects Flashcards
what is the println method
is a service provided by the system.out objects
how we created a scanner object
using the new operator
an object variable does not contain the variable itself true or false
true
it holds the address of an object
after the new operator creates an object
true
if we change the string of string object will be right
true or false
false
string object is immutable
what is alise
aliasing refers to a situation where two different expressions or symbols refer to the same object./
what is the “charAt(int index)”
Returns the char value at the specified index.
what is the “compareTo(String anotherString)”
int
Compares two strings lexicographically.
compareToIgnoreCase(String str)
Compares two strings lexicographically, ignoring case differences.
length()
Returns the length of this string.
toLowerCase()
Converts all of the characters in this String to lower case using the rules of the default locale.
toUpperCase()
Converts all of the characters in this String to upper case using the rules of the default locale.
what is the explanation of compere to
The result is a negative integer if this String object lexicographically precedes the argument string. The result is a positive integer if this String object lexicographically follows the argument string. The result is zero if the strings are equal;
math rondom
random from [0,1[
(int)((math.random()*10)+10 )
0-19