Skip to content

Instantly share code, notes, and snippets.

@Filmaluco
Created February 24, 2023 22:12
Show Gist options
  • Save Filmaluco/55ff3030943f3b72878fb9e2717fd1ba to your computer and use it in GitHub Desktop.
Save Filmaluco/55ff3030943f3b72878fb9e2717fd1ba to your computer and use it in GitHub Desktop.
public class SomaParInteiros
{
public static void main(String args[])
{
int i1, i2;
System.out.println();
if(args.length != 2){
System.out.println("Devem ser indicados 2 parâmetros inteiros!");
return;
}
i1 = Integer.parseInt(args[0]);
i2 = Integer.parseInt(args[1]);
ParInteiros p = new ParInteiros(i1, i2);
System.out.println(p);
System.out.println(i1 + " + " + i2 + " = " + p.getSoma());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment