It is the responsibility of management to be aware of the current and potential threats that the organization is facing or prone to face in the nearest future. The threats could be focused on data integrity, valuable information, applications, or human personnel.
Hence, to make adequate decisions on information security, the management must take an assessment of the current situation of the organization and make plans towards securing the organization.
//This code is designed to create and populate an array with
//Ten Integer values
Scanner in = new Scanner(System.in);
//Create the array
int [] intArray = new int [10];
//populating the array
for(int i =0; i<=10; i++){
System.out.print("Enter the elements: ");
intArray[i]= in.nextInt();
}
//Print the Values in the array
System.out.println(Arrays.toString(intArray));
}
}
Explanation:
The above code looks like it will run successfully and give desired output.
But a bug has been introduced on line 9. This will lead to an exception called ArrayIndexOutOfBoundsException.
The reason for this is since the array is of length 10, creating a for loop from 0-10 will amount to 11 values, and the attempt to access index 10 for the eleventh element will be illegal
One way to fix this bug is to change the for statement to start at 1.