Answer:
JTextField
Explanation:
JTextField is a Swing control which can be used for user input or display of output. It corresponds to a textfield and can be included with other controls such as JLabel, JButton,JList etc. on a comprehensive user interface which is application dependent. JTextField supports a read-write mode where the user can enter a value and it also supports a read-only mode which can be used to display non-editable output to the user.
Answer:
The bystander effect is a theory that people are less likely to help if there are others around.
hope this helped :D
Answer:
a = float(input(“Enter side A: “))
b = float(input(“Enter side B: “))
c = float(input(“Enter side C: “))
d = float(input(“Enter side D: “))
e = float(input(“Enter side E: “))
area1 = (b)*(c)
area2 = (d-e)*(a-c)
area3 = (0.5)*(a-c) *(e)
print(“Room Area: “ + str(area1 + area2 + area3))
Explanation:
Answer:
import java.util.Scanner;
public class HelloIDE
{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter your name: ");
String name = input.nextLine();
name = name.trim();
if(name.equals(""))
name = "stranger";
System.out.println("Hello, " + name + "!");
}
}
Explanation:
import the Scanner class to be able to get input from the user
Create an object of the Scanner class called input
Ask the user to enter the name and set it to the name
Trim the name using trim() method, removes the whitespaces from the string
Check the name. If name is equal to "", set the name as stranger. This way if the name is empty, or just contains whitespaces or if name is not given, name will be set as stranger.
Print the name in required format