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