Answer:
See explaination
Explanation:
StackExample.java
public class StackExample<T> {
private final static int DEFAULT_CAPACITY = 100;
private int top;
private T[] stack = (T[])(new Object[DEFAULT_CAPACITY]);
/**
* Returns a reference to the element at the top of this stack.
* The element is not removed from the stack.
* atreturn element on top of stack
* atthrows EmptyCollectionException if stack is empty
*/
public T peek() throws EmptyCollectionException
{
if (isEmpty())
throw new EmptyCollectionException("stack");
return stack[top-1];
}
/**
* Returns true if this stack is empty and false otherwise.
* atreturn true if this stack is empty
*/
public boolean isEmpty()
{
return top < 0;
}
}
//please replace "at" with the at symbol
Note:
peek() method will always pick the first element from stack. While calling peek() method when stack is empty then it will throw stack underflow error. Since peek() method will always look for first element ffrom stack there is no chance for overflow of stack. So overflow error checking is not required. In above program we handled underflow error in peek() method by checking whether stack is an empty or not.
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.
Answer:
You need sources of information when writing a formal business document because, if the person receiving the document would like to see the full source you got your information from it could help them understand better what they are reading. Also it looks more professional.
Explanation:
The correct answer is B. Check for sufficient available storage space.
Explanation:
One of the factors that can cause it is not possible to install a new app is insufficient storage as space in the mobile device is needed to save the app. This can be easily solved either by deleting apps and other content or expanding the memory available through a Micro SD card. Also, before attempting any major procedure such as a complete reset it is important to check the storage space availability. In this context, the user should check for sufficient available storage space (option B) because this might be the cause of the issue she is experiencing; also, this is a basic step before considering others such as performing a factory reset.