Skip to content

Commit 9de6876

Browse files
author
StephLew1
committed
Logic Methods - large and small
1 parent 8c8f9f9 commit 9de6876

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

ch05/LogicMethods.java

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
public class LogicMethods
22
{
3-
public staic void main ( String[] args )
4-
5-
int
6-
3+
public static void main(String[] args )
74
{
8-
System.out.println("The number is large ");
9-
printIsLarge( number 450 )
5+
System.out.println("Logic Methods");
6+
printIsLargeOrSmall(100) ;
7+
printIsLargeOrSmall(75);
108
}
119

12-
public static void main ( String[] args )
10+
private static void printIsLargeOrSmall (int number)
11+
{
12+
if( number > 99 )
13+
if( number < 10 )
1314

1415

15-
{
16-
if (number > 85) ;
1716
{
18-
System.out.println
17+
System.out.println("The number is large " ) ;
18+
System.out.println("The number is small ") ;
1919
}
20+
2021
}
21-
}
22+
23+
24+
25+
26+
}

0 commit comments

Comments
 (0)