⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 leer.java

📁 solution to the simulation of the vasculating buffer
💻 JAVA
字号:
package examen;
import java.io.*;
public class Leer
{
   public static String dato()
   {
      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 short datoShort()
   {
      try
      {
         return Short.parseShort(dato());
      }
      catch(NumberFormatException e)
      {
         return Short.MIN_VALUE;
      }
   }
   public static int datoInt()
   {
      try
      {
         return Integer.parseInt(dato());
      }
      catch(NumberFormatException e)
      {
         return Integer.MIN_VALUE;
      }
   }
   public static long datoLong()
   {
       try
      {
         return Long.parseLong(dato());
      }
      catch(NumberFormatException e)
      {
         return Long.MIN_VALUE;
      }
   }
   public static float datoFloat()
   {
      try
      {
         Float f= new Float(dato());
         return f.floatValue();
      }
      catch(NumberFormatException e)
      {
         return 50;
      }
   }
   public static double datoDouble()
   {
      try
      {
         Double d= new Double(dato());
         return d.doubleValue();
      }
      catch(NumberFormatException e)
      {
         return Double.NaN;
      }
   }
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -