c语言的char * []用java怎么表达

哈哈gogo 2014-06-01 11:06:14
期待java高手回复
...全文
527 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
teemai 2014-06-01
  • 打赏
  • 举报
回复
引用啊,不用表示,数组就行了
哈哈gogo 2014-06-01
  • 打赏
  • 举报
回复
那*这个,怎么表示呢
save4me 2014-06-01
  • 打赏
  • 举报
回复
c中的char是8位的, 对应java中的byte,char * [] => byte[] Primitive Data Types
引用
Numeric Data Types Integer numeric types are 8-bit byte, 16-bit short, 32-bit int, and 64-bit long. The 8-bit byte data type in Java has replaced the old C and C++ char data type. Java places a different interpretation on the char data type, as discussed below. There is no unsigned type specifier for integer data types in Java. Real numeric types are 32-bit float and 64-bit double. Real numeric types and their arithmetic operations are as defined by the IEEE 754 specification. A floating point literal value, like 23.79, is considered double by default; you must explicitly cast it to float if you wish to assign it to a float variable. Character Data Types Java language character data is a departure from traditional C. Java's char data type defines a sixteen-bit Unicode character. Unicode characters are unsigned 16-bit values that define character codes in the range 0 through 65,535. If you write a declaration such as char myChar = `Q'; you get a Unicode (16-bit unsigned value) type initialized to the Unicode value of the character Q. By adopting the Unicode character set standard for its character data type, Java language applications are amenable to internationalization and localization, greatly expanding the market for world-wide applications.
wu244534279 2014-06-01
  • 打赏
  • 举报
回复
char[] a = new char[]{'a','b','c'} a[0]=='a' a[1]=='b' a[2]=='c'
日知己所无 2014-06-01
  • 打赏
  • 举报
回复
byte[]就行,*可以无视掉
哈哈gogo 2014-06-01
  • 打赏
  • 举报
回复
呼的,好,要

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧