java - I want to pass an object type Stack and a String to another Method in the same Class, but it gives me an error. -


i don't know kind of error is, code:

public static void entrada() {     stack operstack;     string oper = teclado.cadena("¿qué operación desea realizar?");     oper = oper.replaceall(" ", "");     operstack=new stack(oper.length());     conversionstrtoarr(string oper, stack operstack); //here appears error message }  public static void conversionstrtoarr(string oper, stack operstack){      for(int i=1;i<=oper.length();i++)         operstack.push(oper.charat(i));         } 

call in way

conversionstrtoarr(oper, operstack);  

when call method pass value. don't need define type of values @ time of method call.

note : follow java naming conventions.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -