- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA97.java
More file actions
Latest commit
20 lines (18 loc) · 394 Bytes
/
Copy pathA97.java
File metadata and controls
20 lines (18 loc) · 394 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
classA97
{
publicstaticvoidmain(String[] args)
{
inta[] = {2,3,7,8,3,10,9};
System.out.println("----- Program will print apperance of given value 3 in array -----");
intval = 3;
intcount = 0;
for (inti=0;i<a.length ;i++ )
{
if (a[i] == val)
{
count++;
}
}
System.out.println("Number of apperance of 3 in array is :"+count);
}
}