Search Header Logo
Apply Basics of Java Lesson 1.1 - 1.4

Apply Basics of Java Lesson 1.1 - 1.4

Assessment

Presentation

Computers

11th Grade - Professional Development

Easy

Created by

Jeffmark Pinaredondo

Used 7+ times

FREE Resource

31 Slides • 27 Questions

1

​PERFORMING OBJECT-ORIENTED ANALYSIS AND DESIGN (POAD)

LO 1. Apply basics of Java language

Apply basics of Java language

2

Open Ended

Write a Java program to print 'Hello' on screen and then print your name on a separate line

Expected Output :Hello

3

media

4

Open Ended

Write a Java program to print the sum of two numbers.

Expected Output :110

5

Open Ended

Write a Java program to divide two numbers and print on the screen

6

Open Ended

Write a Java program to print the result of the following operations.

a. -5 + 8 6

b. (55+9) % 9

c. 20 + -35 / 8

d. 5 + 15 / 3 * 2 - 8 % 3

Expected Output :

43

1

19

13

7

Open Ended

Write a Java program that takes two numbers as input and display the product of two numbers

Expected Output :25 x 5 = 125

8

Open Ended

Write a Java program to print the sum (addition), multiply, subtract, divide and remainder of two numbers.

Expected Output :125 + 24 = 149

125 - 24 = 101

125 x 24 = 3000

125 / 24 = 5

125 mod 24 = 5

9

Open Ended

Write a Java program that takes a number as input and prints its multiplication table up to 10

Expected Output :8 x 1 = 8

8 x 2 = 16

8 x 3 = 24

...8 x 10 = 80

10

media

​https://www.w3resource.com/java-exercises/basic/index.php

11

media

12

media

13

Recap

Using your web browser, log on to either one of the following URLs:

https://www.sololearn.com/learning

https://www.onlinegdb.com/

Create a simple "Hello World!" java program.

Then answer the questions in the next slides​

Programming | Java

Apply basics of Java language

14

Open Ended

Why is it the public class Main is important when creating a java program?

15

Open Ended

What does public static void main(String []args) do?

16

Open Ended

Explain this statement

System.out.println("Hello World");

17

media
media

18

media
media

19

media

20

media
media

21

Open Ended

Provide a sample value for int data type

22

Open Ended

Provide a sample value for char data type

23

Open Ended

Provide a sample value for string data type

24

Open Ended

Provide a sample value for float data type

25

Open Ended

Provide a sample value for boolean data type

26

​Lesson Objectives:

At the end of the lesson, students shall be able to:

1.1 Demonstrate knowledge of Java technology and Java programming

1.2 Create executable Java applications in accordance with Java framework

1.3 Import Java packages to make them accessible in the code

1.4 Demonstrate working with Java Data types in accordance with Java framework

Apply basics of Java language

27

media
media
media

34

Open Ended

What is a comment? Is the comment ignored by the compiler? How do you denote a comment line and a comment paragraph?

37

Open Ended

What is the statement to display a string on the console?

38

Open Ended

Create a program that would display your full name (First Name Lastname), Section, Subject and Teacher in different lines. Note: Use multi line and single line comment to label the parts of your program. Ex:

System.out.println("Dela Cruz, Juan"); \\Firstname

Make sure that the program is executable or running without syntax errors

39

media
media
media

40

media

41

Open Ended

What is a keyword? List some Java keywords.

42

Open Ended

Is Java case sensitive? What is the case for Java keywords?

43

​Java Keywords

The following list shows the reserved words in Java. These reserved words may not be used as constant or variable or any other identifier names.

media

44

media

45

Draw

Show the output from the given code:

46

media

47

media

48

media

49

media

50

media

51

media

52

Open Ended

What is the Java source filename extension, and what is the Java bytecode filename extension?

53

Open Ended

What are the input and output of a Java compiler?

54

Open Ended

What is the JVM?

55

Open Ended

Can Java run on any machine? What is needed to run Java on a computer?

56

Open Ended

If a NoClassDefFoundError occurs when you run a program, what is the cause

of the error?

57

Open Ended

If a NoSuchMethodError occurs when you run a program, what is the cause of the

error?

58

​Lesson Objectives:

At the end of the lesson, students shall be able to:

1.1 Demonstrate knowledge of Java technology and Java programming

1.2 Create executable Java applications in accordance with Java framework

1.3 Import Java packages to make them accessible in the code

1.4 Demonstrate working with Java Data types in accordance with Java framework

Apply basics of Java language

​PERFORMING OBJECT-ORIENTED ANALYSIS AND DESIGN (POAD)

LO 1. Apply basics of Java language

Apply basics of Java language

Show answer

Auto Play

Slide 1 / 58

SLIDE