This in response to your specific queries (others have mentioned the fundamental concepts above, understanding which is a must for any java newbie )
Questions 1) why do i have ti use RETURN V; i know i have used a String as return type ....... but when i removed t hat return type it gives me error
rETURN TYPE IS MISSING
and correspondingly in the statement R.REMOVE(R.CHECK) it givesme error THE METHOD REMOVE(STRING) IS UNDEFINED FOR THE TYPE REM.
2) if we use the above code which is working then i have some fundamentals to be clear
i am calling r.remove(r.check) and corresponding to that line in the called function is public Strin remov(strin c) .......... domnt u think i should pass the whole class here.........
Answer 1 :
You need not "return v" - just make the return type of your "remove" method "void" and try out the same code after commenting out "return v".
The thing is since you have explicitly mentioned your return type as String so you MUST return a String.
Answer 2 :
Another important aspect is your vocabulary ... "pass the whole class here" ... you can never pass a class. Please learn how to phrase that question correctly. Though you have been given the answer by Layne.