+ 1
Hi, what is the problem?
can i write this? static void c(int x , int y) { system.out.println(x*y) } is it wrong at all? or we can edit this public class Program { static void e (int x) { System.out.println(x); } static void h (int y) { System.out.println(y); } public static void main(String[] args) { int sum = 0; e(4); h(3); sum = e(4) + h(3); System.out.println(sum); } }
2 Réponses
+ 2
//in your class called program,when u call with e(4) and h(3), they'll print as:
4
5
//but when u try to print sum it will print "0" because e(4) and h(3) will return 0 cuz the return type is void
+ 1
ty and about the question number one?