Arrays - Exercises

makes it possible to run Java programs independently of whether or not the Object's toString() method returns a string representation of the current 

Part of the document

publicc lassD river{
public
s tatic
v oid
m ain(String[]a rgs){
String[] strArr =
n ew
S tring[10];
for
(
int
i = s trArr.length- 1 ;i > =0 ;i --){
strArr[i] =
"
b
"
+ ( i- 1 );
}
System.out.println(
"
Value
:
"
+ s trArr[5]);
}
}

Value: b4
publicc lassD river{
public
s tatic
v oid
m ain(String[]a rgs){
double
[]d blArr= { 3.5,6 .8,2 .3,9 .1,1 .0};
for
(
int
i = 0 ;i < d blArr.length;i ++){
dblArr[i] /= 2;
}
for
(
int
i = d blArr.length- 1 ;i > =0 ;i --){
System.out.println(
"
Value
:
"
+ d blArr[i]);
}
}
}