"identifier> expected"error
Can anyone please tell me where do I declare the variable "bb", so that I do not get "identifier> expected" error. My code is:
public class Main extends javax.swing.JFrame
{
static String bb="";
[... lines of code ...]
private void jComboBox1ActionPerformed(java.awt.event.ActionEve nt evt)
{
String b=null;
String bb=null;
Object a=jComboBox1.getSelectedItem();
b=(String)a;
bb=b.substring(0,1);
System.out.println("bb "+bb);//Its printing fine hre
}
//System.out.println("bb "+bb);//but I need to print here, but am
getting the error "identifier>
expected"
|