Storing value of a method in one varible.but the error is :
MAIN METHOD SHOULD DISPLAY RESULT OF A SQR() METHOD.
program runs successfully.giving correct output.
package com.codegym.task.task01.task0127;
/*
Square of a number
*/
public class Solution {
public static void main(String[] args) {
//write your code here
int result = sqr(5);
System.out.println ("The square of 5 is :" + result);
}
public static int sqr(int a) {
return a * a;
}
}