JAVA·ÃÎÊ¿ØÖÆ·ûºÍ¶¯Ì¬°ó¶¨
Ê×ÏÈ´ÓÒ»µÀÃæÊÔÌâĿ̸Æð:
package pkg1;
public class Jupiter
{
void method1(){
System.out.println("In Jupiter");
}
public void call(){
method1();
}
}
package pkg2;
import pkg1.Jupiter;
public class Minerva extends Jupiter{
public void method1(){
System.out.println("In Minerva");
}
public static void main(String[] args) {
new Minerva().call();
}
}
Õâ¸ö³ÌÐòµÄÔËÐнá¹ûÊÇ£¨ÇëÑ¡Ôñ£©£º
A ±àÒë´íÎó
B In Jupiter
C In Minerva
D In
Jupiter
In Minerva
ÔËÐнá¹ûÊÇB.
ÔÒò£º¸¸ÀàJupiterÖеÄmethod1·½·¨µÄÐÞÊηûΪdefault,¼´friendly£¬¶ø×ÓÀà¸ú¸¸À಻ÔÚͬһ¸ö°üÖУ¬
×ÓÀàMinervaÎÞ·¨·ÃÎʵ½¸¸ÀàµÄmethod1·½·¨£¬¹Ê×ÓÀ಻»áÖØд¸¸ÀàµÄmethod1º¯Êý£¬
ËùÔÚµØÒÔMinerva().call()½«Ö±½Óµ÷Óø¸ÀàµÄmethod1,
Èç¹û½«¸¸ÀàµÄmethod1·½·¨¸ÄΪpublic £¬ÔòÑ¡C¡£
ÑÓÉ죺
javaÖÐpublic ,protected,private,friendly·ÃÎÊ¿ØÖÆȨ·¶Î§£º
×÷ÓÃÓò: µ±Ç°Àà ͬһ°ü ×ÓËïÀà
ÆäËû°ü
public Y Y Y Y
private Y N N N
protected Y Y Y N
firendly Y Y&n
Ïà¹ØÎĵµ£º
ÔÚstylesheet±êÇ©ÀïÉùÃ÷ÃüÃû¿Õ¼äºÍµ÷Ó÷½·¨£º
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:proc="${path}/packageName" exclude-result-prefixes="proc">
......
<xsl:value-of select="proc:className.methodName(param)"/>
${path}Ëæ±ãÔõÑùд¶¼¿ÉÒÔ£¬¼´Ê¹ÊǸ ......
½ñÌìÔÚ±àдһ¸ö¿ìËÙÅÅÐòº¯Êý£¬ÆäÖÐÏëÓÃÒ»¸öÔÚC++ÖÐÀàËÆswap¹¦Äܵĺ¯Êý£¬½á¹ûÒý·¢ÁËһϵÁеÄÎÊÌâ¡£
ÏÂÃæÊÇÔÚÍøÉÏËѵ½µÄ´úÂ룬²¢ÔÚÎҵı¾µØ»úÉÏ×÷ÁËÔËÐС£
public class ParamTest
{
public static void ......
Òý£ºAndroid µÄAPIÖÐÓиö java.util.regex °ü£¬ÆäÖÐÓÐÁ½¸öÀ࣬һ¸ö½Ó¿ÚºÍÒ»¸öÒì³££º
Interfaces
MatchResult
Holds the results of a successful match of a Pattern against a given string.
Classes
Matcher
Provides a means of matching regular expressions against a given input,
finding occurrences of ......
package com.color.program;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class CompareTime {
public static void main(String[] args){
String t1 = "2008-05-09";
String t2 = "20 ......
2009Äê08ÔÂ12ÈÕ ÐÇÆÚÈý 10:31 A.M.
Éú³É¾²Ì¬Ò³Ãæ¼¼Êõ½â¾ö·½°¸Ö®Ò»
תÔØÕßÇ°ÑÔ£ºÕâÊÇÒ»¸öÈ«ÃæµÄjsp¶¯Ì¬Ò³Ã澲̬»¯·½°¸£¬±¾Õ¾µÄÌû×Ó¾²Ì¬»¯·½°¸½«½è¼øÕâƪÌû×ÓÖз½·¨¡£Ïòhttp://www.agilejava.orgµÄsingleµÄ¹²Ïí¾«ÉñÖ¾´¡£
תÌûÕýÎÄ£º
ÏàÐźܶàÈ˶¼Ï£Íû×Ô¼ºµÄÒ³ÃæÔ½¿ìÔ½ºÃ£¬×îºÃÊ ......