View Single Post
  #1 (permalink)  
Old 07-16-2007, 06:31 PM
paul paul is offline
Member
 
Join Date: Jul 2007
Posts: 26
paul is on a distinguished road
Error: Non-static method append(char) cannot be referenced from a static context
I'm having trouble trying to use StringBuffer() on the following code. The error I'm getting is:
ChangeBase.java:91: non-static method append(char) cannot be referenced from a static context.

Code:
public void actionPerformed(ActionEvent e) { //.... for(int j = 0; j<count; j++){ test = ChangeBase.pop(); System.out.println(test); StringBuffer.append(str.charAt(test));//where str is just a string. This is line 91. } } StringBuffer buf = new StringBuffer(); jtfResult.setText(buf.toString()); //...
Anyone has an idea what the error is refering to? Thanks
Reply With Quote
Sponsored Links