Hi,
I have tried all possible command lines , but I could not find the solution,
Please help.
public class Solution {
public static void main(String[] args) {
int a=2;
int b=2;
int result=(c);
}
and then, also tried,
public class Solution {
public static void main(String[] args) {
int a=2;
int b=2;
int result=sum(int a, int b);
}
and also tried,
public class Solution {
public static void main(String[] args) {
int a=2;
int b=2;
int c =(a + b);
}
Note: I have not yet completed the ... 'Call' the 'method' part of the course in codegym yet.
I would still like to know the solution for the program.
Thank You.
package com.codegym.task.task01.task0128;
/*
As simple as 2+2
*/
public class Solution {
public static void main(String[] args) {
int a=2;
int b=2;
}
public static void sum(int a, int b) {
int c = a + b;
System.out.print(c);
}
}