
Suppose there are two methods in a libray and you have to invoke one of the method from that library directly from the command prompt.
How will you do it?

import java.util.*;
class JavaMethod
{
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.print("Enter Number1: ");
int num1=input.nextInt();
System.out.print("Enter Number2: ");
int num2=input.nextInt();
int maximum=Math.max(num1,num2);
System.out.println("Largest is: "+maximum);
}
}

This is not exactly what am I looking for.
Here you are invoking the method with in the code, not from the command prompt directly.
Here just the two numbers are read from command prompt only, nothing specific to invoking method from Command prompt.
Same we can use with args of main method. Based on the the type of input we can invoke the method from code.
My concern is that is there any way to invoke method of library directly from Command Prompt?
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.