public class Solution {
public static void main(String[] args) {
int a = sqr(5);
System.out.println("the square of 5" + a);
}
public static int sqr(int a) {
return a * a;
}
}
================================================
What is the problem here … I call the method and output text ..!
package com.codegym.task.task01.task0127;
/*
Square of a number
*/
public class Solution {
public static void main(String[] args) {
//write your code here
sqr(5);
System.out.println("the square of 5");
}
public static int sqr(int a) {
return a * a;
}
}