SlideShare a Scribd company logo
1 of 18
Download to read offline
2011   10   3
2011   10   3
2011   10   3
public class ListEvenNumbers {
            	 public static void main(String[] args) {

            	   	   //define limit
            	   	   int limit = 50;

            	   	   System.out.println("Printing Even numbers between 1 and " + limit);

                    // i     1     50

            	   	   for(int i=1; i <= limit; i++){

            	   	   	   //                    ?      ?
                        //              P37
            	   	   	   if( i % 2 == 0) {
            	   	   	   	 System.out.print(i + " ");
            	   	   	   }


            	 	 }
            	 }
            }
            /*
            Output of List Even Numbers Java Example would be
            Printing Even numbers between 1 and 50
            2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50
            */



2011   10   3
2011   10   3
0   ->   0000   0000   ->   00
                 1   ->   0000   0001   ->   01
                 2   ->   0000   0010   ->   02
                 3   ->   0000   0011   ->   03
                 4   ->   0000   0100   ->   04
                 5   ->   0000   0101   ->   05
                 6   ->   0000   0110   ->   06
                 7   ->   0000   0111   ->   07
                 8   ->   0000   1000   ->   08
                 9   ->   0000   1001   ->   09
                10   ->   0000   1010   ->   0A
                11   ->   0000   1011   ->   0B
                12   ->   0000   1100   ->   0C
                13   ->   0000   1101   ->   0D
                14   ->   0000   1110   ->   0E
                15   ->   0000   1111   ->   0F
                16   ->   0001   0000   ->   10
2011   10   3
2011   10   3
2011   10   3
2011   10   3
2011   10   3
2011   10   3
2011   10   3
2011   10   3
public class VariablesSample {
            	   public static void main(String[] args) {
            	   	    byte b;
            	   	    short s;
            	   	    int i;
            	   	    long l;
            	   	    char c;
            	   	    float f;
            	   	    double d;

            	       	   b   =   Byte.MIN_VALUE;
            	       	   s   =   Short.MIN_VALUE;
            	       	   i   =   Integer.MIN_VALUE;
            	       	   l   =   Long.MIN_VALUE;
            	       	   c   =   (int)Character.MIN_VALUE;
            	       	   f   =   Float.MIN_VALUE;
            	       	   d   =   Double.MIN_VALUE;
            	       	
            	       	   System.out.println(b);
            	       	   System.out.println(s);
            	       	   System.out.println(i);
            	       	   System.out.println(l);
            	       	   System.out.println((int)c);
            	       	   System.out.println(f);
            	       	   System.out.println(d);
            	       }
            }




2011   10       3
2011   10   3
2011   10   3
public class BooleanSample {
            	 public static void main(String[] args) {
            	 	 boolean t = true;
            	 	 boolean f = false;
            	 	
            	 	 if( t == true ){
            	 	 	 System.out.println("t is true!");
            	 	 }else{
            	 	 	 System.out.println("t is false!");
            	 	 }
            	 	
            	 	 if( f == true ){
            	 	 	 System.out.println("f is true!");
            	 	 }else{
            	 	 	 System.out.println("f is false!");
            	 	 }
            	 	
            	 	 boolean isTtrue = ( t == true);
            	 	 System.out.println("(t == true) is " + isTtrue);
            	 }
            }

2011   10   3
2011   10   3

More Related Content

What's hot (19)

Dependent Types with Idris
Dependent Types with IdrisDependent Types with Idris
Dependent Types with Idris
 
Program presentation
Program presentationProgram presentation
Program presentation
 
Vcs8
Vcs8Vcs8
Vcs8
 
Python
PythonPython
Python
 
3 flow
3 flow3 flow
3 flow
 
Android taipei 20160225 淺談closure
Android taipei 20160225   淺談closureAndroid taipei 20160225   淺談closure
Android taipei 20160225 淺談closure
 
Domain Redesigned
Domain RedesignedDomain Redesigned
Domain Redesigned
 
Control flow in c
Control flow in cControl flow in c
Control flow in c
 
Twigエクステンションの作り方
Twigエクステンションの作り方Twigエクステンションの作り方
Twigエクステンションの作り方
 
Gambas
Gambas Gambas
Gambas
 
System Verilog (Tutorial -- 2X1 Multiplexer)
System Verilog (Tutorial -- 2X1 Multiplexer)System Verilog (Tutorial -- 2X1 Multiplexer)
System Verilog (Tutorial -- 2X1 Multiplexer)
 
Emo
EmoEmo
Emo
 
オレオレSecurityバンドル作っちゃいました
オレオレSecurityバンドル作っちゃいましたオレオレSecurityバンドル作っちゃいました
オレオレSecurityバンドル作っちゃいました
 
Reverse Engineering: C++ "for" operator
Reverse Engineering: C++ "for" operatorReverse Engineering: C++ "for" operator
Reverse Engineering: C++ "for" operator
 
05 1 수식과 연산자
05 1 수식과 연산자05 1 수식과 연산자
05 1 수식과 연산자
 
Structure in programming in c or c++ or c# or java
Structure in programming  in c or c++ or c# or javaStructure in programming  in c or c++ or c# or java
Structure in programming in c or c++ or c# or java
 
Learning C programming - from lynxbee.com
Learning C programming - from lynxbee.comLearning C programming - from lynxbee.com
Learning C programming - from lynxbee.com
 
Open GL Tutorial07
Open GL  Tutorial07Open GL  Tutorial07
Open GL Tutorial07
 
Vb
VbVb
Vb
 

Viewers also liked

金沢高専・グローバル情報学科 科長講話 (新入生研修)
金沢高専・グローバル情報学科 科長講話 (新入生研修)金沢高専・グローバル情報学科 科長講話 (新入生研修)
金沢高専・グローバル情報学科 科長講話 (新入生研修)金沢工業高等専門学校
 
夏期休業中の評価課題(Javaプログラミング演習)
夏期休業中の評価課題(Javaプログラミング演習)夏期休業中の評価課題(Javaプログラミング演習)
夏期休業中の評価課題(Javaプログラミング演習)金沢工業高等専門学校
 
H27/04/01 金沢高専・グローバル情報学科紹介
H27/04/01 金沢高専・グローバル情報学科紹介H27/04/01 金沢高専・グローバル情報学科紹介
H27/04/01 金沢高専・グローバル情報学科紹介金沢工業高等専門学校
 
Sygnalizacja
SygnalizacjaSygnalizacja
SygnalizacjaDZPS
 
OS: 論理ファイル管理 - ディレクトリについて
OS: 論理ファイル管理 - ディレクトリについてOS: 論理ファイル管理 - ディレクトリについて
OS: 論理ファイル管理 - ディレクトリについて金沢工業高等専門学校
 
ファイルアクセス方式 - オペレーティングシステム
ファイルアクセス方式 - オペレーティングシステムファイルアクセス方式 - オペレーティングシステム
ファイルアクセス方式 - オペレーティングシステム金沢工業高等専門学校
 
オブジェクト指向プログラミングの考え方
オブジェクト指向プログラミングの考え方オブジェクト指向プログラミングの考え方
オブジェクト指向プログラミングの考え方金沢工業高等専門学校
 

Viewers also liked (17)

金沢高専・グローバル情報学科 科長講話 (新入生研修)
金沢高専・グローバル情報学科 科長講話 (新入生研修)金沢高専・グローバル情報学科 科長講話 (新入生研修)
金沢高専・グローバル情報学科 科長講話 (新入生研修)
 
今日からはじめるセキュリティセミナ
今日からはじめるセキュリティセミナ今日からはじめるセキュリティセミナ
今日からはじめるセキュリティセミナ
 
夏期休業中の評価課題(Javaプログラミング演習)
夏期休業中の評価課題(Javaプログラミング演習)夏期休業中の評価課題(Javaプログラミング演習)
夏期休業中の評価課題(Javaプログラミング演習)
 
H27/04/01 金沢高専・グローバル情報学科紹介
H27/04/01 金沢高専・グローバル情報学科紹介H27/04/01 金沢高専・グローバル情報学科紹介
H27/04/01 金沢高専・グローバル情報学科紹介
 
インタフェース - Java入門
インタフェース - Java入門 インタフェース - Java入門
インタフェース - Java入門
 
データベース - SELECT文入門2
データベース - SELECT文入門2データベース - SELECT文入門2
データベース - SELECT文入門2
 
金沢スマホアプリコンテスト
金沢スマホアプリコンテスト金沢スマホアプリコンテスト
金沢スマホアプリコンテスト
 
ファイナルプレゼン
ファイナルプレゼンファイナルプレゼン
ファイナルプレゼン
 
Sygnalizacja
SygnalizacjaSygnalizacja
Sygnalizacja
 
授業資料 - ファイルシステム
授業資料 - ファイルシステム授業資料 - ファイルシステム
授業資料 - ファイルシステム
 
データーベース - SELECT文入門
 データーベース - SELECT文入門 データーベース - SELECT文入門
データーベース - SELECT文入門
 
コンピュータシステムの構成とか
コンピュータシステムの構成とかコンピュータシステムの構成とか
コンピュータシステムの構成とか
 
OS: 論理ファイル管理 - ディレクトリについて
OS: 論理ファイル管理 - ディレクトリについてOS: 論理ファイル管理 - ディレクトリについて
OS: 論理ファイル管理 - ディレクトリについて
 
ファイルアクセス方式 - オペレーティングシステム
ファイルアクセス方式 - オペレーティングシステムファイルアクセス方式 - オペレーティングシステム
ファイルアクセス方式 - オペレーティングシステム
 
ファイルとレコード
ファイルとレコードファイルとレコード
ファイルとレコード
 
オブジェクト指向プログラミングの考え方
オブジェクト指向プログラミングの考え方オブジェクト指向プログラミングの考え方
オブジェクト指向プログラミングの考え方
 
SQL入門 - GROUP BYとHAVING -
SQL入門 - GROUP BYとHAVING -SQL入門 - GROUP BYとHAVING -
SQL入門 - GROUP BYとHAVING -
 

Similar to 変数の型 - Java 演習

Similar to 変数の型 - Java 演習 (20)

Vcs14
Vcs14Vcs14
Vcs14
 
C tutorial
C tutorialC tutorial
C tutorial
 
Vcs5
Vcs5Vcs5
Vcs5
 
Java operators
Java operatorsJava operators
Java operators
 
c_tutorial_2.ppt
c_tutorial_2.pptc_tutorial_2.ppt
c_tutorial_2.ppt
 
03 and 04 .Operators, Expressions, working with the console and conditional s...
03 and 04 .Operators, Expressions, working with the console and conditional s...03 and 04 .Operators, Expressions, working with the console and conditional s...
03 and 04 .Operators, Expressions, working with the console and conditional s...
 
Operators
OperatorsOperators
Operators
 
C tutorial
C tutorialC tutorial
C tutorial
 
Java Foundations: Data Types and Type Conversion
Java Foundations: Data Types and Type ConversionJava Foundations: Data Types and Type Conversion
Java Foundations: Data Types and Type Conversion
 
Data types and Operators
Data types and OperatorsData types and Operators
Data types and Operators
 
Tu1
Tu1Tu1
Tu1
 
STL
STLSTL
STL
 
Creative Coding 1 - 2 Variables
Creative Coding 1 - 2 VariablesCreative Coding 1 - 2 Variables
Creative Coding 1 - 2 Variables
 
Intro to c programming
Intro to c programmingIntro to c programming
Intro to c programming
 
03-Primitive-Datatypes.pdf
03-Primitive-Datatypes.pdf03-Primitive-Datatypes.pdf
03-Primitive-Datatypes.pdf
 
Utility.ppt
Utility.pptUtility.ppt
Utility.ppt
 
Mcq cpup
Mcq cpupMcq cpup
Mcq cpup
 
Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
 
An Introduction to Part of C++ STL
An Introduction to Part of C++ STLAn Introduction to Part of C++ STL
An Introduction to Part of C++ STL
 

More from 金沢工業高等専門学校

H27・11月28日 金沢高専・グローバル情報学科 入試説明会
H27・11月28日 金沢高専・グローバル情報学科 入試説明会H27・11月28日 金沢高専・グローバル情報学科 入試説明会
H27・11月28日 金沢高専・グローバル情報学科 入試説明会金沢工業高等専門学校
 
金沢高専・新入生へのメッセージ「これからの5年間をどう過ごしますか」
金沢高専・新入生へのメッセージ「これからの5年間をどう過ごしますか」金沢高専・新入生へのメッセージ「これからの5年間をどう過ごしますか」
金沢高専・新入生へのメッセージ「これからの5年間をどう過ごしますか」金沢工業高等専門学校
 
本格的なプログラミングが学べる学校・金沢高専
本格的なプログラミングが学べる学校・金沢高専本格的なプログラミングが学べる学校・金沢高専
本格的なプログラミングが学べる学校・金沢高専金沢工業高等専門学校
 
Scratchをつかってプログラムの流れを説明(抜粋)
Scratchをつかってプログラムの流れを説明(抜粋)Scratchをつかってプログラムの流れを説明(抜粋)
Scratchをつかってプログラムの流れを説明(抜粋)金沢工業高等専門学校
 

More from 金沢工業高等専門学校 (9)

H27・11月28日 金沢高専・グローバル情報学科 入試説明会
H27・11月28日 金沢高専・グローバル情報学科 入試説明会H27・11月28日 金沢高専・グローバル情報学科 入試説明会
H27・11月28日 金沢高専・グローバル情報学科 入試説明会
 
金沢高専・新入生へのメッセージ「これからの5年間をどう過ごしますか」
金沢高専・新入生へのメッセージ「これからの5年間をどう過ごしますか」金沢高専・新入生へのメッセージ「これからの5年間をどう過ごしますか」
金沢高専・新入生へのメッセージ「これからの5年間をどう過ごしますか」
 
本格的なプログラミングが学べる学校・金沢高専
本格的なプログラミングが学べる学校・金沢高専本格的なプログラミングが学べる学校・金沢高専
本格的なプログラミングが学べる学校・金沢高専
 
モデリングとクラス図
モデリングとクラス図モデリングとクラス図
モデリングとクラス図
 
Scratchをつかってプログラムの流れを説明(抜粋)
Scratchをつかってプログラムの流れを説明(抜粋)Scratchをつかってプログラムの流れを説明(抜粋)
Scratchをつかってプログラムの流れを説明(抜粋)
 
参照型 - Java入門
参照型 - Java入門参照型 - Java入門
参照型 - Java入門
 
型変換と優先順位 - Java入門
型変換と優先順位 - Java入門型変換と優先順位 - Java入門
型変換と優先順位 - Java入門
 
情報処理 - CUI 入力のポイント
情報処理 - CUI 入力のポイント情報処理 - CUI 入力のポイント
情報処理 - CUI 入力のポイント
 
看護分野におけるネット活用
看護分野におけるネット活用看護分野におけるネット活用
看護分野におけるネット活用
 

Recently uploaded

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 

Recently uploaded (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 

変数の型 - Java 演習

  • 1. 2011 10 3
  • 2. 2011 10 3
  • 3. 2011 10 3
  • 4. public class ListEvenNumbers { public static void main(String[] args) { //define limit int limit = 50; System.out.println("Printing Even numbers between 1 and " + limit); // i 1 50 for(int i=1; i <= limit; i++){ // ? ? // P37 if( i % 2 == 0) { System.out.print(i + " "); } } } } /* Output of List Even Numbers Java Example would be Printing Even numbers between 1 and 50 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 */ 2011 10 3
  • 5. 2011 10 3
  • 6. 0 -> 0000 0000 -> 00 1 -> 0000 0001 -> 01 2 -> 0000 0010 -> 02 3 -> 0000 0011 -> 03 4 -> 0000 0100 -> 04 5 -> 0000 0101 -> 05 6 -> 0000 0110 -> 06 7 -> 0000 0111 -> 07 8 -> 0000 1000 -> 08 9 -> 0000 1001 -> 09 10 -> 0000 1010 -> 0A 11 -> 0000 1011 -> 0B 12 -> 0000 1100 -> 0C 13 -> 0000 1101 -> 0D 14 -> 0000 1110 -> 0E 15 -> 0000 1111 -> 0F 16 -> 0001 0000 -> 10 2011 10 3
  • 7. 2011 10 3
  • 8. 2011 10 3
  • 9. 2011 10 3
  • 10. 2011 10 3
  • 11. 2011 10 3
  • 12. 2011 10 3
  • 13. 2011 10 3
  • 14. public class VariablesSample { public static void main(String[] args) { byte b; short s; int i; long l; char c; float f; double d; b = Byte.MIN_VALUE; s = Short.MIN_VALUE; i = Integer.MIN_VALUE; l = Long.MIN_VALUE; c = (int)Character.MIN_VALUE; f = Float.MIN_VALUE; d = Double.MIN_VALUE; System.out.println(b); System.out.println(s); System.out.println(i); System.out.println(l); System.out.println((int)c); System.out.println(f); System.out.println(d); } } 2011 10 3
  • 15. 2011 10 3
  • 16. 2011 10 3
  • 17. public class BooleanSample { public static void main(String[] args) { boolean t = true; boolean f = false; if( t == true ){ System.out.println("t is true!"); }else{ System.out.println("t is false!"); } if( f == true ){ System.out.println("f is true!"); }else{ System.out.println("f is false!"); } boolean isTtrue = ( t == true); System.out.println("(t == true) is " + isTtrue); } } 2011 10 3
  • 18. 2011 10 3