09 2014 档案
摘要:11,含不同数字的三位数: public class ThridNum { public static void main(String[] args) { int count = 0; for (int x = 1; x < 5; x++) { for (int y = 1; y < 5; y++) { ...
阅读全文
摘要:6,求最大公约数和最小公倍数 import java.util.Scanner; public class HCFandLCM { public static void main(String[] args) { int a, b, m; Scanner scanner = new Scanner(System.in); ...
阅读全文
摘要:1,生兔子问题(斐波那契数列) public class Fibonacci { public static void main(String[] args) { System.out.println("The rabit of 1th month : 1"); System.out.println("The rabit of 2th month : 2"); ...
阅读全文
摘要:Example:InnerHTML We are sorry,but this application needs JavaScript to be enabled to work.Please contact us if you cannot enable scripting and...
阅读全文
摘要:Example:Replacing noscript We are sorry,but this application needs JavaScript to be enabled to work.Please contact us if you cannot enable scri...
阅读全文
摘要:Example:Submit buttons to links Name: Email: submitToLinks.js fun...
阅读全文
摘要:Date Example02 Events search Date in the format DD/MM/YYYY: (example 25/01/1923) checkdate.js: ...
阅读全文
摘要:一,通过子节点查询父节点: 二, function GetTwoEnd() { var myLinkItem=document.getElementById('linkedItem'); var first=firstSibling(myLinkItem.parentNode); var last=lastSibling(myLinkI...
阅读全文
摘要:DOM Example Heading Paragraph Subheading List 1 List 2 Linked List Item List 4 Paragraph Paragraph ...
阅读全文
摘要:Date example Events search Date in the format DD/MM/YYYY: (example 23/01/1933)
阅读全文
摘要:一,使用document.write() 二,使用window方法,prompt(),alert()和confirm() Search example Search the site:
阅读全文
摘要:import java.nio.IntBuffer; public class IntBufferDemo01 { public static void main(String[] args) { IntBuffer buf = IntBuffer.allocate(10); System.out.print("The position,l...
阅读全文
摘要:import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.InvalidProperties...
阅读全文
摘要:import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; public class PropertiesDemo03 { pu...
阅读全文
摘要:import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties; public class PropertiesDemo02 { p...
阅读全文
摘要:my eclipse =====>open in explorer 打开文件的所在文件夹。 javadoc –d doc SimpleBeanDocumented.java 在doc目录中生成SimpleBean的java doc文档。
阅读全文
摘要:import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @Retention(value=RetentionPolicy.RUNTIME) public @interface MyDefaultAnnotationReflect { public String...
阅读全文
摘要:import java.lang.reflect.Array; public class ChangeArrayDemo { public static void main(String[] args) { int temp[] = { 1, 2, 3 }; int newTemp[] = (int[]) arrayInc(temp, 5)...
阅读全文
摘要:import java.lang.reflect.Array; public class ClassArrayDemo { public static void main(String[] args) { int temp[] = { 1, 2, 3 }; Class c = temp.getClass().getComponentType...
阅读全文
摘要:import java.lang.reflect.Field; public class InvokeFieldDemo { public static void main(String[] args) throws Exception { Class cl = null; Object obj = null; cl ...
阅读全文
摘要:一 ,调用无参方法: import java.lang.reflect.Method; public class InvokeSayJapanDemo { public static void main(String[] args) { Class c1=null; try { c1=Class.forName(PersonZ.cla...
阅读全文
摘要:interface China { public static final String NATIONAL = "JAPAN"; public static final String AUTHOR = "SIGERU"; public void sayJapan(); public String sayHello(String name, int ag...
阅读全文
摘要:import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; class Person { private String name; private int age; public Person(String name, int age) ...
阅读全文
摘要:class X { } public class GetClassDemo01 { public static void main(String[] args) { X x = new X(); System.out.println(x.getClass().getName()); Class c1=...
阅读全文
摘要:enum ColorE { RED, GREEN, BLUE; } public class GetEnumContent { public static void main(String[] args) { // ColorE color=ColorE.BLUE; // System.out.println(color)...
阅读全文
摘要:系统内建的Annotation: @Override:覆写的Annotation,方法覆写时使用,用于保证方法覆写的正确性。 @Deprecated:不赞成使用的Annotation,用来声明一个不建议使用的方法。 @SuppressWarning:压制安全警告的Annotation。 自定义: public @interface MyDefaultAnnotationValue ...
阅读全文
浙公网安备 33010602011771号