test.java
来自「This temp directory is used by the JVM f」· Java 代码 · 共 40 行
JAVA
40 行
package org.apache.catalina.deploy;
public final class Test {
public static void main(String args[]) {
String list[] = null;
System.out.println("Creating new collection");
SecurityCollection collection = new SecurityCollection();
System.out.println("Adding GET and POST methods");
collection.addMethod("GET");
collection.addMethod("POST");
System.out.println("Currently defined methods:");
list = collection.findMethods();
for (int i = 0; i < list.length; i++)
System.out.println(" " + list[i]);
System.out.println("Is DELETE included? " +
collection.findMethod("DELETE"));
System.out.println("Is POST included? " +
collection.findMethod("POST"));
System.out.println("Removing POST method");
collection.removeMethod("POST");
System.out.println("Currently defined methods:");
list = collection.findMethods();
for (int i = 0; i < list.length; i++)
System.out.println(" " + list[i]);
System.out.println("Is DELETE included? " +
collection.findMethod("DELETE"));
System.out.println("Is POST included? " +
collection.findMethod("POST"));
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?