public class FunctionParams {
public static void main(String[] args) {
System.out.println("Chal Nikal");
Addition(10, 15);
public static void Addition(int a,int b)
{
int c=a+b;
System.out.println©;
}
}
}
why this code is throwing an error
public class FunctionParams {
public static void main(String[] args) {
System.out.println("Chal Nikal");
Addition(10, 15);
public static void Addition(int a,int b)
{
int c=a+b;
System.out.println©;
}
}
}
why this code is throwing an error
@missroy Brackets are not arranged properly and in the function addition you have to use syso correctly with proper syntax. You correct code is given below.
public class FunctionParams {
public static void main(String[] args) {
System.out.println("Chal Nikal");
Addition(10, 15);
}
public static void Addition(int a,int b){
int c=a+b;
System.out.println(c);
}
}