If you just want the two methods you can write and use them like this.
import java.io.*;
public class ExpTest
{
Scanner in=new Scanner(System.in);
public static void main(String[] args)
{
ExpTest test = new ExpTest();
System.out.println(test.getText("Enter word/email"));
System.out.println(test.getNumber("Enter integEr"));
}
private String getText(String prompt)
{
System.out.println(prompt);
//make a string called b and in it put whatever the user inputs
// Save user input in variable "b" and return it to the caller.
String b=in.nextLine();
return b;
}
private int getNumber(String prompt)
{
System.out.println(prompt);
int LOL=in.nextInt();
return LOL;
}
}
If you want to encapsulate them in a separate class you would make a few changes.