My main java code is like that:
package Javathesis; //import... etc //... public class Javathesis; // My main class { public static void // There are a lot of these classes here //... //... class x { String a; String b; x(String a, String b) { this.a = a; this.b = b; } } public void getAllDataDB1 { ArrayList<ArrayList<x>> cells = new ArrayList<>(); while(resTablesData1.next()) { ArrayList<CellValue> row = new ArrayList<>(); for (int k=0; k<colCount ; k++) { String colName = rsmd.getColumnName(i); Object o = resTablesData1.getObject(colName); row.add(new x(rsmd.getColumnType(),o.toString()); } cells.add(row); } public static void main(String[] args) { connectToDB1(); // i want to call an instance of class "x" HERE!!! } } How can i call class x in public static void main? Am i doing something wrong? I already test the way i know
Class class = new Class(); class.x(String a, String b); but i receive errors. Can somebody help me to fix this? Thanks in advance.