如何编写个浪漫点的程序
package test1;
public class Calculatetimes {
public static void main(String[] args) {
String s="hahahasongliaiwulleihahahaha";
int num=0;
// TODO Auto-generated method stub
for(int i=0;i<s.length();i++)
{if(s.charAt(i)=='a')
{num++;}}
System.out.println("字符a出现的次数:"+num);
}
}