Java programming
30.2K subscribers
131 photos
12 files
20 links
Download Telegram
August 27, 2020
class Check
{
public static void main(String args[]) { int num = 9; if ( num % 2 == 0 ) System.out.println("output1"); else System.out.println("output2"); } }
Anonymous Quiz
31%
output1
69%
output2
August 28, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
September 14, 2020
public class Madam
{
public static void main(String[] args) { int a = 5; System.out.println(cube(a)); } static int cube(int theNum) { return theNum * theNum * theNum; } }
Anonymous Poll
51%
125
27%
Compilation Error because cube is already defined in the java.lang.Math class.
12%
Throws an ArithmeticException.
10%
Compilation Error or Runtime Error for some other reason.
September 14, 2020