Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exercise Java programming

Similar presentations


Presentation on theme: "Exercise Java programming"— Presentation transcript:

1 Exercise Java programming
MISY 2312 Introductory Programming for Information Systems Exercise Java programming Hadeel Amer Al-Amrei ID:

2 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

3 (Numerical) Q1:what the output ?
public class NumericalExamples { public static void main (String [] args) { System.out.print(" = "); System.out.println( ); System.out.print("2 + 3 = "); System.out.println(2 + 3); } } Output: = 5.0 2 + 3 = 5

4 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)

5 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


Download ppt "Exercise Java programming"

Similar presentations


Ads by Google