Saturday, July 22, 2023

JAVA - COMMAND LINE - EXAMPLE 2

 public class CommandLine2 {

    public static void main(String[] args) {
        int i,sum=0;
        for (i=0;i<args.length;i++)
        {
            sum=sum+Integer.parseInt(args[i]);
        }
        System.out.println("Sum is="+sum);
    }
}

No comments:

Post a Comment

SD Card vs SSD: What’s Really Happening Inside Your Storage

  We use SD cards in phones and cameras, and SSDs in laptops and PCs, almost without thinking. They both feel similar—fast, silent, and com...