1. package javagently;
  2.  
  3. import java.io.*;
  4. public class LasIn{
  5. private static BufferedReader l�sin=
  6. new BufferedReader(
  7. new InputStreamReader(System.in));
  8. public static int l�sHeltal(String p){
  9. try{
  10. System.out.print(p);
  11. String indata=l�sin.readLine();
  12. int k=Integer.parseInt(indata);
  13. return k;
  14. }
  15. catch(Exception e){
  16. throw new RuntimeException(
  17. "l�sHeltal:ej ett heltal");
  18. }
  19. }
  20. public static double l�sFlyttal(String p){
  21. try{
  22. System.out.print(p);
  23. String indata=l�sin.readLine();
  24. double k=Double.valueOf(indata).doubleValue();
  25. return k;
  26. }
  27. catch(Exception e){
  28. throw new RuntimeException(
  29. "l�sFlyttal:ej ett flyttal");
  30. }
  31. }
  32. public static String l�sStr�ng(String p){
  33. try{
  34. System.out.print(p);
  35. String indata=l�sin.readLine();
  36. return indata;
  37. }
  38. catch(Exception e){
  39. throw new RuntimeException(
  40. "l�sStr�ng:ej en str�ng");
  41. }
  42. }
  43. }
  44.