1. Write the output of the following: SN Code Output a double num = 7.25, A; A = Math.floor(num ) + Math.ceil(5.4); System.out.println("A = "+ A); b int x = 8, y=3, z; z = Math.max(10,5) - 4;...


1. Write the output of the following:<br>SN<br>Code<br>Output<br>a double num = 7.25, A;<br>A = Math.floor(num ) + Math.ceil(5.4);<br>System.out.println(

Extracted text: 1. Write the output of the following: SN Code Output a double num = 7.25, A; A = Math.floor(num ) + Math.ceil(5.4); System.out.println("A = "+ A); b int x = 8, y=3, z; z = Math.max(10,5) - 4; System.out.println("Max is "+ Math.max(x,y)); System.out.println("Min is "+ Math.min(x.y)); System.out.println("Z ="+z); double num = 9,8; System.out.println("Floored is "+ Math.floor(num)); System.out.println("Ceiling is "+ Math.ceil(num)); 2. Write the output of the following: SN Code Output a String ml="Welcome to Java"; String m2="Welcome to Java"; String m3="WELCOME TO JAVA"; System.out.println(ml.length()); System.out.println(m1.indexOf('a')); System.out.println(m1.charAt(3)); b String ml="Welcome "; String m2="to Java"; System.out.println(m1.concat(m2)); System.out.println(m2.indexOf(ml.charAt(4))); c String ml="Welcome to Java"; String m2="Welcome to Java"; String m3="WELCOME TO JAVA"; System.out.println(m1.compareTo(m2)); System.out.println(m1.substring(8)); System.out.println(m1.substring(8,13)); 3. Write the output of the following: SN Code Output a String name = "Mohammed Al-Kaabi"; System.out.println(name.length()); System.out.println(name.substring(0,name.indexOf("d")): System.out.println(name.substring(name.indexOf("K"), name.length())); b double result = Math.min(3, 7) + Math.abs(-50); System.out.println("Result is " + result); System.out.println(Math.sqrt(121.0) - Math.sqrt(256.0)); System.out.println(Math.abs(Math.min(-3, -5)));

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here