Exercise Java programming MISY 2312 Introductory Programming for Information Systems Exercise Java programming Hadeel Amer Al-Amrei ID: 200900410
Q1:What is Java ? Java is The java programming language was created by Sun Microsystems, Inc. A programming language specifies the words and symbols that we can use to write a program. Is a programming language expressly designed for use in the distributed environment of the Internet. All above Correct Answer
(Numerical) Q1:what the output ? public class NumericalExamples { public static void main (String [] args) { System.out.print("2 + 3.0 = "); System.out.println(2 + 3.0); System.out.print("2 + 3 = "); System.out.println(2 + 3); } } Output: 2 + 3.0 = 5.0 2 + 3 = 5
Q3: what is output ? 40 45 ((9 * (9 + 1)) / 2) public class SeriesSum { public static void main (String [] args) { int n = 9; System.out.println((n * (n + 1)) / 2); } B Correct Answer 40 45 ((9 * (9 + 1)) / 2)
Q4: what is correct code? B is correct A. class helloWorld{ public static void main(String args[ ]){ System.out.println(Hello World!); } B. class helloWorld{ System.out.println(“Hello World!”); C. class helloWorld{ System.out.println(“Hello World!”) B is correct