-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kabysoft
committed
Aug 26, 2022
1 parent
b40c04d
commit 5ed1586
Showing
5 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.metadata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package Hello_World; | ||
|
||
public class While_Loop { | ||
|
||
public static void main(String[] args) { | ||
// TODO Auto-generated method stub | ||
|
||
int x = 10; | ||
|
||
while( x < 20 ) { | ||
System.out.print("value of x : " + x ); | ||
x++; | ||
System.out.print("\n"); | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package Hello_World; | ||
|
||
public class do_while_loop { | ||
|
||
public static void main(String[] args) { | ||
// TODO Auto-generated method stub | ||
|
||
int x = 10; | ||
|
||
do { | ||
System.out.print("value of x : " + x ); | ||
x++; | ||
System.out.print("\n"); | ||
}while( x < 20 ); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package Hello_World; | ||
|
||
public class for_loop { | ||
|
||
public static void main(String[] args) { | ||
// TODO Auto-generated method stub | ||
|
||
for(int x = 10; x < 20; x = x + 1) { | ||
System.out.print("value of x : " + x ); | ||
System.out.print("\n"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package Hello_World; | ||
|
||
public class logical_operators { | ||
|
||
public static void main(String[] args) { | ||
|
||
boolean a = true; | ||
boolean b = false; | ||
|
||
System.out.println("a && b = " + (a&&b)); | ||
System.out.println("a || b = " + (a||b) ); | ||
System.out.println("!(a && b) = " + !(a && b)); | ||
|
||
} | ||
|
||
} |