Site hosted by Angelfire.com: Build your free website today!

package Misclases;

import java.awt.*;

import java.lang.*;

import javax.swing.*;

import java.io.*;

public class Getdat

{

Getdat(){}

 

 

public static String getCad()

{

String sdato="";

try

{

InputStreamReader isr = new InputStreamReader(System.in);

BufferedReader flujoE = new BufferedReader(isr);

sdato= flujoE.readLine();

}

catch (IOException e)

{

System.err.println("Error: "+ e.getMessage());

}

return sdato;

}

 

 

public static double getDou(){

String linea;

BufferedReader bufer;

try{

bufer =new BufferedReader(new InputStreamReader(System.in));

linea=bufer.readLine();

return Double.parseDouble(linea);

}

catch(NumberFormatException e){

System.out.println("No es entero...");

System.exit(1);

return 0;

}

catch(IOException e){return 0;}

}

public static int getInt(){

String linea;

BufferedReader bufer;

try{

bufer =new BufferedReader(new InputStreamReader(System.in));

linea=bufer.readLine();

return Integer.parseInt(linea);

}

catch(NumberFormatException e){

System.out.println("No es entero...");

System.exit(1);

return 0;

}

catch(IOException e){return 0;}

}

public static float getFoat(){

String linea;

BufferedReader bufer;

try{

bufer =new BufferedReader(new InputStreamReader(System.in));

linea=bufer.readLine();

return Float.parseFloat(linea);

}

catch(NumberFormatException e){

System.out.println("No es flotante...");

System.exit(1);

return 0;

}

catch(IOException e){return 0;}

}

public static String getChar(){

String linea;

BufferedReader bufer;

try{

bufer =new BufferedReader(new InputStreamReader(System.in));

linea=bufer.readLine();

return linea;

}

catch(IOException e){

System.out.println("No es caracter...");

System.exit(1);

return null;

}

}

}