Answer:
15
Explanation:
if ..else is the conditional statement which is used to check the condition is true or not, if the condition is true that execute the particular statement and if not it moves to else part for execution.
if condition is more than two we can use continuous if else statement
Syntax:
if(condition)
{
statement;
}else if(condition)
{
statement;
}else
{
statement;
}
In the code:
The value of the input is 5.
first it goes to if part and check condition if 5 > 5, condition false it equal to 5 not greater than 5.
it then moves to else if part and check condition if 5 > 2, condition is true,
it execute the code inside the else if part. so, input_value become
5+10 which 15.
after that, program control terminate the if else statement it does not check further.
The results of a psychological research can be used for malignant purposes, such as fooling individuals through their emotions, using propaganda to change beliefs, and manipulating others through the media.
But it can also be used for good – which is what the question is asking. It is clear that from the available options, only (D) improving communication and relationships are an example of how psychological research is used for good.
Answer:
b) Plus sign
Explanation:
The plus sign or addition operator (+) accomplishes concatenation. This is a greatly used in the Java's output Statement to combine values coming from different data types into a formatted output
consider the code snippet below which uses concatenation to output information about an individual
public class Name {
public static void main(String[] args) {
int age =18;
String name = "John";
System.out.println("His name is "+name +" and his age is "+age);
}
}
The + operator has been used to concatenate the int value age and the String value stored in name to the output