You can try for this
public String rotateStringCW(String str, int no){
int N=str.length();
String str1= str.substring(N-no,N)+str.substring(0,N-no);
return str1;
}
Type: Posts; User: hurrah
You can try for this
public String rotateStringCW(String str, int no){
int N=str.length();
String str1= str.substring(N-no,N)+str.substring(0,N-no);
return str1;
}
I think the problem given is incomplete
In each subclass declare a static variable counter.
Increment it in the constructor itself
for e.g
class Cylinder extends Solids{
static int counter1;
Cylinder(){
counter1=counter1+1;
}
Hi everybody!
:o