Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computers & Programming Languages

Similar presentations


Presentation on theme: "Computers & Programming Languages"— Presentation transcript:

1 Computers & Programming Languages

2 Use char and Boolean variables
Primitive Data Type Char - Boolean Lesson1- Objectives Use char and Boolean variables

3 Data Type أنواع البيانات
Primitive Data Types integer byte short int long Floating Point float double character char Boolean boolean

4 To represent any single character, letter, digit & special symbol.
When and how to use char data type ? To represent any single character, letter, digit & special symbol. ‘F’, ‘M’, ‘$’, ‘0’ Should be enclosed with a single quotation mark ‘ ‘

5 char data type declaration
System.out.println(“Enter a character”); Scanner c1 = new Scanner (System.in); name= c1.next().charAt(0); int data type declaration System.out.println(“Enter the number”); Scanner c1 = new Scanner (System.in); num = c1.nextInt(); int num; num=5; int num=5;

6 Example P

7 Activity in your book P-208
Open a new program and type the program in page 208 Modify your program as requested in question 2 ??

8 Boolean data type declaration
To represent two logical values , true or false Boolean data type declaration Boolean x; X = true; Boolean x = true;

9 Activity in your book P-209

10 Book Activity Page 211 Questions 1 - 3

11 Q4 + Practical Activity (1)
Activity in your book P-212 Q4 + Practical Activity (1)


Download ppt "Computers & Programming Languages"

Similar presentations


Ads by Google