🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #20897

Re: �������ø�����ĸ�ʽ

#20897
From: ������
Date: Sat, 13 Dec 2003 07:34
18 lines
1257 bytes
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λС����ʾ��
: �磺1.255414��ֻ��ʾΪ1.2����1.3


--

     simple is beauty

�� ��Դ:������δ��վ bbs.pku.edu.cn��[FROM: 202.112.86.8]
Technical Details
Message-ID: <49ckCH$9qT@bbs.pku.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.cn99.com!maily.cic.tsinghua.edu.cn!news.happynet.org!PKU

Show 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:35:07 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.cn99.com!maily.cic.tsinghua.edu.cn!news.happynet.org!PKU
From: elove@bbs.pku.edu.cn (������)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: �������ø�����ĸ�ʽ
Date: 13 Dec 2003 07:34:08 GMT
Organization: ����δ��վ
Message-ID: <49ckCH$9qT@bbs.pku.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1071300689.A
Lines: 18