我的错误代码
import java.util.Scanner;
class queue {
int len;
int outnumber;
int innumber;
int staynumber=len-outnumber;
int Queue[]=new int[len];
int Innumber[]=new int[innumber];
int Outnumber[]=new int[outnumber];
public void queuelength() {
Scanner sc=new Scanner(System.in);
int len=sc.nextInt();
}
public void inqueue(){
for(int i=0;i<len;i++){
Scanner sc=new Scanner(System.in);
Queue[i]=sc.nextInt();
}
}
public void setOutnumber(){
System.out.print("out ");
Scanner sc=new Scanner(System.in);
outnumber=sc.nextInt();
}
public void setInnumber(){
System.out.print("in ");
Scanner sc=new Scanner(System.in);
for(int i=0;i<innumber;i++){
Innumber[i]= sc.nextInt();
}
}
public void changequeue(){
if(innumber>outnumber){len+=innumber=outnumber;}
for(int i=0;i<outnumber;i++)
Queue[i]=Queue[i+outnumber];
for(int i=staynumber;i<len;i++){
Queue[i]=Innumber[i-staynumber];
}
for(int i=0;i<outnumber;i++){
Outnumber[i]=Queue[i];
}
}
public void printqueue(){
System.out.print("len = "+len+", data =");
for(int i=0;i<len;i++){
System.out.print(" "+Queue[i]);
}
System.out.print("\n");
System.out.print("len = "+outnumber+", data =");
for(int i=0;i<=outnumber;i++){
System.out.print(" "+Outnumber[i]);
}
}
}
public class queuetest {
public static void main(String[] args) {
queue queue1 = new queue();
queue1.queuelength();
queue1.inqueue();
queue1.setOutnumber();
queue1.setInnumber();
queue1.changequeue();;
queue1.printqueue();;
}
}