![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
public void get() throws IOException { //1. Properties pr=new Properties(); String path=this.getClass().getResource("/db.xml").getPath(); FileInputStream fr=new FileInputStream(path); pr.load(fr); String url=pr.getProperty("url"); //2. String string="dasdqehjhgradasdasd"; String max_str=""; int max_cs=0; while(string.length()>0) { String first=string.substring(0, 1); string.replaceAll(first, ""); int length=string.length(); if(max_cs<length) { max_cs=length; max_str=first; } } //3. String temp=""; for(int i=string.length();i>=0;i--) { temp=temp+string.charAt(i-1); } System.out.println(temp); }