can you return an array? or an array of objects? or return an object? is that really possible? or is that possible? can anyone give me examples? and also can anyone provied me any good links when it comes to good programming practice? OOP specifically since I want to be a good java programmer also can you return user defined classes? like objects with setters and getters? and arrays? and arrays of objects?
double Amounts ={1,2,3,4,5,6,7}
for(int i = 0;i<Amounts.length;i++) {
Briefcase[i] cases= new Briefcase[];
double x = Amounts[i];
Briefcase[i].setValue(x);
}
public Briefcase[] get(){
return Briefcase[];
}
Yes, in many different ways. Not exactly sure what you are asking, so here are a few examples.