`
wqmgxj
  • 浏览: 22738 次
  • 性别: Icon_minigender_2
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
文章列表
public class testN { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub       testN n=new testN();       double m = n.getall(5);       System.out.println(m); }     public double getall(int a){     if(a==1) return 1;     else     return a*geta ...
public class WeekOfMonth { /** * @param args */ public static void main(String[] args) { String str = "2008-10-12"; SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); Calendar calendar = Calendar.getInstance(); try { calendar.setTime(formatter.pa ...
引用public class wwww { /*  public static void main(String[] args) throws CloneNotSupportedException {     Calendar cal = Calendar.getInstance(); //int year = cal.get(Calendar.YEAR); int Month =cal.get(Calendar.MONTH)+1; System.out.println(Month); cal.add(cal.MONTH, -1); int saleMonth = ...
public class substr { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub substr s= new substr(); String b = s.getString("我ABC汉DEF", 5); System.out.println(b); } public String  getString (String stringname,int a){ String name1 ...
public class test { public static void main(String[] args) { String s="abcdefga"; /* char[] b=a.toCharArray(); System.out.println(b[0]); StringBuffer buf=new StringBuffer(); for (int j = b.length-1; j>-1 ; j--) { buf.append(b[j]); } System.out.println(buf.toString ...
引用   public   class   random     {         public   static   void   main(String   argv[])         {         StringBuffer oldstr=new StringBuffer();       StringBuffer newstr=new StringBuffer();       Set s=new HashSet();       do{           char c=ran();   s.add(c); }while(s.siz ...
引用public class WordCounts { public static void main(String[] args){ String strTemp = "asdjfo8ifsdkfncnvfaklfdsa;";             Map tree = new HashMap<String, Integer>();                char ch; for(int i = 0;i<strTemp.length();i++){ ch=strTemp.charAt(i); if(t ...
Global site tag (gtag.js) - Google Analytics