Answer:
// program in java.
import java.util.*;
// class definition
class Main
{
// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// object to read input
Scanner scr=new Scanner(System.in);
System.out.print("Enter the String:");
// read string from user
String str=scr.nextLine();
System.out.print("Enter the character:");
// read character
char ch=scr.next().charAt(0);
// variable to count the occurrence of character
int char_count=0;
for(int i=0;i<str.length();i++)
{
// find the character i string
if(ch==str.charAt(i))
// increase the count
char_count++;
}
// print the count
System.out.println("count of "+ch+" in the String is:"+char_count);
}catch(Exception ex){
return;}
}
}
Explanation:
Read a string from user and assign it to variable "str".Then read a character to and assign it to variable "ch".Then Declare a variable "char_count" to count the occurrence of character in the string.Find the count of character in the string. Here upper case character is different than lower case.
Output:
Enter the String:Monday
Enter the character:n
count of n in the String is:1
Enter the String:Nobody
Enter the character:n
count of n in the String is:0
Answer:
Security controls are those measures taken to prevent, identify, counteract, and reduce security risks to computer systems, whereas, Security Requirements are guidelines or frameworks that stipulates measures to ensure security control.
Explanation:
Security controls encompass all the proactive measures taken to prevent a breach of the computer system by attackers. Security requirements are those security principles that need to be attained by a system before it can be certified as safe to use.
Security controls are of three types namely, management, operational, and technical controls. Examples of technical controls are firewalls and user authentication systems. A statement like 'The system shall apply load balancing', is a security requirement with an emphasis on availability.
Answer: SQL Injection
Explanation:
The SQL injection is one of the type of attack which is used in the database management system for sending the commands by adding the structured query (SQL) language statement in the form of input data.
- The SQL injection is the technique of code injection in which the SQL statement for the purpose of sending commands.
- It is widely used in the data driven applications.
- The various types of web applications and web pages are used the SQL injection and uses in the form of input in the SQL query and then it is executed in the database.
Therefore, The SQL injection is the correct option.
What do you need help with here?
Answer:
Computer Monitors earned him maximum profit. For details, please check the attachment.
Explanation:
Please check the attachment.