so in one class I have this string: String LB = lcfield.getText(); to store whatever is written inside the JTextField. In another class I have a SQL statement where I need to use the same value as whatever is inside the LB string.
How to call this string?
Inside the class that owns the
JTextField:And next to the SQL-statement, you can simply do: