Answer:
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
The complete program calling the method is given in the explanation section
Explanation:
import java.util.Scanner;
public class ANot {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Please Enter two numbers");
int num1= in.nextInt();
int num2 = in.nextInt();
System.out.println("The largest magnitude number is: "+maxMagnitude(num1,num2));
}
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
}
The maxMagnitude() method uses if/else statement to compare two ints and return the larger one
Answer:
i would say c but it could be wrong
Explanation:
Answer: Proxy server
Explanation: Proxy server is a type of server that is acts as interface between the network on huge scale and any local network. This server provides the feature of security, operations, privacy etc in the network system. They also help in improving the performance of the network.
It can work as the web filter to eliminate the unwanted websites.They acts as the gateway by observing the website that is being browsed by the other user.Thus installation of proxy server should implemented on the organization.
Answer:
first = int(input("Enter first number "))
second = int(input("Enter second number "))
third = int(input("Enter third number "))
largest = max([first, second, third]);
print("The largest number is", largest)
Explanation:
There you go!
<h2>double, long, float, short, byte</h2>
Explanation:
The given data types are built-in types. According to java, the following holds right to justify the order.
Double:
- This occupies 64 bits
- It can hold decimal values
- Example: "1.23456e300d, -1.23456e-300d, 1e1d"
Float:
- It occupies 32 bits
- Holds decimal values
- Example: "1.23e100f, -1.23e-100f, .3f, 3.14F"
Long:
- It occupies 64 bits
- Example: "-2L, -1L, 0L, 1L, 2L"
Short:
- It occupies 16 bits
- Stores twos complement integer
Byte:
- Stores twos complement integer