ÓÃjava ´òÓ¡ÁâÐÎ
public class testthree {
public static void main(String[] args) {
testthree t = new testthree();
t.test();
}
private static void test() {
int d = 0;
int f = 4;
int x = 0;
int y = 6;
for (int j = 0; j < 4; j++) {
f = f - 1;
for (int i = 0; i < f; i++) {
System.out.print(" ");
}
d = d + 2;
for (int i = 1; i < d; i++) {
System.out.print("*");
}
System.out.println();
}
for (int j = 0; j < 4; j++) {
x = x + 1;
for (int i = 0; i < x; i++) {
System.out.print(" ");
}
y = y - 2;
for (int i = 0; i <= y; i++) {
System.out.print("*");
}
System.out.println();
}
}
}
Ïà¹ØÎĵµ£º
Cookie£º¼Ç¼Óû§µÇ½״̬£¬¿ÉÒÔÔÚ¿Í»§¶Ë´´½¨cookie£¬¿ÉÒÔʹÓû§µÚ¶þ´ÎµÇ½µÄʱºò²»ÓÃÊäÈëÓû§ÃûºÍÃÜÂ룬¼´¿ÉÒԵǽµ½Ö÷Ò³
Ö÷Òª´úÂ룺
LoginView ÖУº £¨»ñÈ¡cookie£©
//»ñÈ¡cookie
Cookie [] cs=request.getCookies();
String name="";
String value="";
if(null!=cs)
......
Java»ù´¡-ѧϰʹÓÃAnnotation×¢½â¶ÔÏó
×¢½â(Ò²±»³ÆÎªÔªÊý¾Ý)ΪÎÒÃÇÔÚ´úÂëÖÐÌí¼ÓÐÅÏ¢ÌṩÁËÒ»ÖÖÐÎʽ»¯µÄ·½·¨,ʹÎÒÃÇ¿ÉÒÔÔÚÉÔºóij
¸öʱ¿Ì·Ç³£·½±ãµØÊ¹ÓÃÕâЩÊý¾Ý
1-1:»ù±¾Óï·¨
Java SE5ÄÚÖÃÈýÖÖ±ê×¼×¢½â
@Override:±íʾµ±Ç°µÄ·½·¨¶¨Ò彫¸²¸Ç³¬ÀàÖеķ½·¨.Èç¹ûÄ㲻СÐÄÆ´Ð´´íÎó,»òÕß·½·¨Ç©Ãû¶Ô²»Éϱ»¸²
¸ÇµÄ·½·¨ ......
JDK 5.0 ÖÐÔö¼ÓµÄ·ºÐÍÀàÐÍ£¬ÊÇ Java ÓïÑÔÖÐÀàÐͰ²È«µÄÒ»´ÎÖØÒª¸Ä½ø¡£µ«ÊÇ£¬¶ÔÓÚ³õ´ÎʹÓ÷ºÐÍÀàÐ͵ÄÓû§À´Ëµ£¬·ºÐ͵ÄijЩ·½Ãæ¿´ÆðÀ´¿ÉÄܲ»ÈÝÒ×Ã÷°×£¬ÉõÖÁ·Ç³£Ææ¹Ö¡£ÔÚ±¾ÔµēJava ÀíÂÛºÍʵ¼ù”ÖУ¬Brian Goetz ·ÖÎöÁËÊø¸¿µÚÒ»´ÎʹÓ÷ºÐ͵ÄÓû§µÄ³£¼ûÏÝÚå¡£Äú¿ÉÒÔͨ¹ýÌÖÂÛÂÛ̳Óë×÷ÕßºÍÆäËû¶ÁÕß·ÖÏíÄú¶Ô±¾ÎĵĿ´·¨¡ ......
public static void getSysProp(){
Properties props = System.getProperties();
Set<Entry<Object,Object>> res = props.entrySet();
Iterator it = res.iterator();
while (it.hasNext())
{
Map.Entry e = (Map.Entry)it.next();
......