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

📄 main.java

📁 利用BlueJ开发的一个类似小时候完的吃豆豆的小游戏
💻 JAVA
字号:
/*  * $Id: Main.java,v 1.2 2003/03/28 17:50:45 gus Exp $ * * Developed for "Rethinking CS101", a project of Lynn Andrea Stein's AP Group. * For more information, see <a href="http://www.ai.mit.edu/projects/cs101/">the * CS101 homepage</a> or email <las@ai.mit.edu>. * * Copyright (C) 1998 Massachusetts Institute of Technology. * Please do not redistribute without obtaining permission. */package cs101.util;/** * Main hides the public static void main( String[] argv ) construct * from students by providing a command line interface.  Each command * line argument is treated as a class name that is instantiated once. * <br> * Copyright 1998 Massachusetts Institute of Technology * * @see cs101.util.Coerce * * @author  Todd C. Parnell, tparnell@ai.mit.edu * @version $Id: Main.java,v 1.2 2003/03/28 17:50:45 gus Exp $ * */public final class Main {  public static void main(String[] argv) {    for (int i = 0; i < argv.length; ++i) {      try {	Object o = Coerce.newInstanceByClassname( argv[i] );      } catch (CreationException ce) {	System.err.println("Could not create " + argv[i]);	System.err.println("Make sure you typed the class name correctly and that a no argument constructor exists.");      }    }  }  /**   * Prevent instantiation   */  private Main() {}}/* * $Log: Main.java,v $ * Revision 1.2  2003/03/28 17:50:45  gus * acomdate change in Coerce method name * * Revision 1.1.1.1  2002/06/05 21:56:32  root * CS101 comes to Olin finally. * * Revision 1.4  1998/07/24 17:19:29  tparnell * Placate new javadoc behavior * * Revision 1.3  1998/07/21 19:33:20  tparnell * added private Main() * * Revision 1.2  1998/06/07 17:00:07  tparnell * changed to use NewInstanceByClassname * * Revision 1.1  1998/06/04 23:18:14  tparnell * added a StringToObject method in Coerce, and a generic Main wrapper so * students can avoid public static void main(String[] argv) * */

⌨️ 快捷键说明

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