最菜的问题!在线等答案!(50分)

  • 主题发起人 linuxcrow
  • 开始时间
L

linuxcrow

Unregistered / Unconfirmed
GUEST, unregistred user!
变量如下
String s="12345"
如何把s赋值给一个long型的变量???
 
long p;
P:=strtoint(s);
 
大哥java里有strtoint这个函数吗???
 
long p;
String s = "123";
p = Long.parseLong(s);
LUCKY!
 
StrToFloat !!
 

这是问Java的问题,zhuny说的是对的。
 
Long 的静态方法如下:
public static long parseLong(String s)
throws NumberFormatException
long p;
String s = "123";
p = Long.parseLong(s);
同意zhuny的
 
多人接受答案了。
 

Similar threads

S
回复
0
查看
958
SUNSTONE的Delphi笔记
S
S
回复
0
查看
779
SUNSTONE的Delphi笔记
S
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
933
SUNSTONE的Delphi笔记
S
顶部