Q:

Passing arguments to Static constructor with Intent

Hello I am new to Java and I am trying to do something so I need some help; I have a constructor as such :
public static void main(String[] args) throws IOException {
    access();
    key(args[0], args[1]);
}

and I am trying to pass the values for keys from the UI of my android Interface in main activity as such:
private void enter(String keycode) {
    String[] args = {"keycode", "pin"};
    Intent myIntent = new Intent(MainActivity.this, MainActivity.main());
    myIntent.putExtra ("keycode", "pin"); //Optional parameters
    startActivity(myIntent);
}

But I am getting an error which is saying, the type main(String[]) is not applicable to the argument() in eclipse.
The keycode is from the onclick listener and I statically declared the pin. The key and pin are supposed to be the values of arg[0] and arg[1] in main. I have not run it or anything, all I need is just a correct syntax to call the main static method from the "enter" on click listener construct.
Thank you in advance. So in general, I have two parameters that main method takes:
access(); // all parameters are static defined
key(arg[0] , arg[1]);
I need to pass those args using intent or some method that would start my activity. All in the same class. Sorry about my ignorance if any.
BTW emulator of interface runs fine, I just need to access the main(strings [] args), just that part.

A:

1)There is no such thing as a static constructor.  The entire concept is an oxymoron.
2)Android doesn't use main functions.
3)That's not how you start an activity anyway.  The second parameter of Intent's constructor is a Class, not a function call- which isn't legal java anyway as function pointers don't exist.
What you're doing is so confused I'm not even sure how to fix it.  You need to start from scratch with android tutorials on what an activity is and how an android app works.

