Answer:
// program in Java.
// package
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);
// ask to enter the name
System.out.print("Enter a name:");
// read name
String name=scr.nextLine();
// print the hello message
System.out.println("Hello "+name);
}catch(Exception ex){
return;}
}
}
Explanation:
Create a Scanner object to read name from user.Read name from user and assign it to variable "name".Then print the message Hello followed by the name.
Output:
Enter a name:Sam
Hello Sam
Answer:
b. & Puihaha
Explanation:
PHP variables are supposed to start with a $ sign.
Other rules followed by PHP variables are:
Starting character in variable name (after $) must be letter or _.
Other characters in variable names can be letters,numbers or _.
a. $_Puihaha
c. $Pui_haha
d. $Puihaha
satisfy these rules.
Whereas , b. & Puihaha does not satisfy as it starts with '&'. Moreover it also contains an invalid space character in the variable.
Generally I'd recommend not buying one online, tends to be cheaper from a shop - and better used, although their are some risks with 2nd hand devices, I think the big price cut it worth it.
If you did want to buy online, maybe Amazon or Ebay?