title: Passing arguments in main method in java class
body: <p>Can someone tell me what is the need to declare a class like this:</p>
  
  <pre><code>public class Test {
  
   String k;
   public Test(String a, String b, String c){
    k = a + " " + b + " " + c; //do something
  
   }
  
   public void run(){
    System.out.println(k);
   }
  
   public static void main(String[] args) {
    String l = args[0];
    String m = args[1];
    String n = args[2];
    Test obj = new Test(l,m,n);
    obj.run();
   }
  
  }
  </code></pre>
  
  <p>Of course it works but I don't get the point why would one use such way to implement something. Is it because we need to pass arguments directly to the class main method that is why we use this way or is there some other reason?</p>
  
  <p>What is the purpose of <code>public Test(...)</code> using the same class name. Why is it like this?</p>