public class Main extends Thread
{
class credit extends Thread
{
public void run()
{
String filename="Credit_card.txt";
String path_Training_DataSet="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets"+filename;
String path_Attribute_Information="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets\\Attribute_information.data";
String dlimiter=",";
Dataset training_DataSet= new Dataset(path_Training_DataSet,dlimiter,path_Attrib ute_Information,dlimiter,"training");
}
}
class debt extends Thread
{
public void run()
{
String filename="Debt_consolidations.txt";
String path_Training_DataSet="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets"+filename;
String path_Attribute_Information="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets\\Attribute_information.data";
String dlimiter=",";
Dataset training_DataSet= new Dataset(path_Training_DataSet,dlimiter,path_Attrib ute_Information,dlimiter,"training");
}
}
class education extends Thread
{
public void run()
{
String filename="Educational_loan.txt";
String path_Training_DataSet="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets"+filename;
String path_Attribute_Information="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets\\Attribute_information.data";
String dlimiter=",";
Dataset training_DataSet= new Dataset(path_Training_DataSet,dlimiter,path_Attrib ute_Information,dlimiter,"training");
}
}
class home extends Thread
{
public void run()
{
String filename="Home_loan.txt";
String path_Training_DataSet="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets"+filename;
String path_Attribute_Information="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets\\Attribute_information.data";
String dlimiter=",";
Dataset training_DataSet= new Dataset(path_Training_DataSet,dlimiter,path_Attrib ute_Information,dlimiter,"training");
}
}
public static void main(String args[])
{
long start=System.currentTimeMillis();
try
{
String filename="Small_Business.txt";
String path_Training_DataSet="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets"+filename;
String path_Attribute_Information="C:\\Users\\Kunal Pakhira\\Documents\\NetBeansProjects\\Main\\src\\D atasets\\Attribute_information.data";
String dlimiter=",";
Dataset training_dataset= new Dataset(path_Training_DataSet,dlimiter,path_Attrib ute_Information,dlimiter,"training");
************************ERROR********************* *******
credit t1=new credit(); //here it shows non static variable, this cannot be referenced from a static context
debt t2=new debt();
education t3=new education();
home t4=new home();
************************ERROR********************* *******
t1.start();
t2.start();
t3.start();
t4.start();
t1.join();
t2.join();
t3.join();
t4.join();
}
catch(Exception e)
{
System.out.println("Exception happened");
}
long end=System.currentTimeMillis();
System.out.println("Required time="+(end-start));
}
}