Skip to content

Commit f81c965

Browse files
Create Enhancedvalue.java
1 parent 5c5e964 commit f81c965

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Enhancedvalue.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
public class practice {
2+
3+
public static void main(String[] args) {
4+
int nums []= {1,2,3,4,5,6,7,8,9};
5+
6+
int val=5;
7+
boolean found=false;
8+
9+
for(int x:nums) {
10+
if(x == val) {
11+
found=true;
12+
break;
13+
}
14+
}
15+
16+
if(found)
17+
System.out.println("value found");
18+
19+
20+
}
21+
}

0 commit comments

Comments
 (0)