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

📄 key.java

📁 Creaton s Quest是一个有趣的Java角色扮演游戏!很有趣
💻 JAVA
字号:
/*By: Chad Marson
Date Started: May 15
Latest Revised: June 16, 2002
Purpose: converts input types
*/
import java.io.*;
public class key{//class to convert input types
	
	public static String readString (String x) throws Exception{//method to convert input to string
		BufferedReader keyboard=new 
		BufferedReader(new InputStreamReader(System.in),1);
		x=keyboard.readLine();
		return x;
	}//end of readString method
	public static int readInt (int x) throws Exception{//method to convert input to an integer
		BufferedReader keyboard=new 
		BufferedReader(new InputStreamReader(System.in),1);
		x=Integer.parseInt(keyboard.readLine());
		return x;
	}//end of readInt method
	public static double readDouble (double x) throws Exception{//method to convert input to a double
		BufferedReader keyboard=new 
		BufferedReader(new InputStreamReader(System.in),1);
		x=Double.parseDouble(keyboard.readLine());
		return x;
	}//end of readDouble
	public static float readFloat (float x) throws Exception{//method to convert input to a float
		BufferedReader keyboard=new 
		BufferedReader(new InputStreamReader(System.in),1);
		x=Float.parseFloat(keyboard.readLine());
		return x;
	}//end of readFloat
	
}//end of key class	

⌨️ 快捷键说明

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