Article View: cn.bbs.comp.lang.java
Article #20899Re: �������ø�����ĸ�ʽ
From: ������
Date: Sat, 13 Dec 2003 07:46
Date: Sat, 13 Dec 2003 07:46
24 lines
1729 bytes
1729 bytes
лл
�� �� elove@bbs.pku.edu.cn (����Ψ��) �Ĵ������ᵽ: ��
: double f=1.234;
: int len=2; //������λС��
: string s=f+"";
: int i=s.indexOf(".");
: s=s.substring(0,i+1+len);
: system.out.println(s);
: //��������ԸĽ�һ�£��ж���������
: �� �� breezeyy.bbs@Freecity.dhs.org (������) �Ĵ������ᵽ: ��
: : ��ν�������ֻȡ1λС����ʾ��
: >> .................<����ʡ��>............
--
��
����Ҫ����ȥ������ �q�r
���������������� �t�s
�u || �v
|| ��
�� ||����
[m[1;37m�� ��Դ:��Ʈ��ˮ�Ƽ� Freecity.dhs.org��[FROM: breezeyy][m
Technical Details
Message-ID:
<49ckUM$9aJ@Freecity.dhs.org>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!FreecityShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: f6cb0,2fa397deeb22cc58 X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2003-12-12 23:47:49 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity From: breezeyy.bbs@Freecity.dhs.org (������) Newsgroups: cn.bbs.comp.lang.java Subject: Re: �������ø�����ĸ�ʽ Date: 13 Dec 2003 07:46:07 GMT Organization: Ʈ��ˮ�Ƽ� Message-ID: <49ckUM$9aJ@Freecity.dhs.org> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: Java/M.1071301558.A