Given the following program segment : public class ABC { public static void main(String[] args) { int
Fantastic news! We've Found the answer you've been seeking!
Question:
Given the following program segment :
public class ABC { public static void main(String[] args) { int i = 1; while ( i <= 5) { xMethod(i); i++; } } public static void xMethod(int i) { int num = 1; for (int j = 1; j <= i; j++) { System.out.print(num + " "); num *= 3; } System.out.println(); } } |
What is the output of the above program?
Related Book For
Java How To Program Early Objects
ISBN: 9780134743356
11th Edition
Authors: Paul Deitel, Harvey Deitel
Posted Date: