SUN认证考试面试题.pdfVIP

  • 2
  • 0
  • 约7.15千字
  • 约 8页
  • 2023-11-23 发布于中国
  • 举报
SUN认证考试面试题 1.Which of the following fragments might cause errors? A. String s = Gone with the wind; String t = good ; String k = s + t; B. String s = Gone with the wind; String t; t = s[3] + one; C. String s = Gone with the wind; String standard = s.toUpperCase(); D. String s = home directory; String t = s - directory; answer:(BD)这道题考察 java 字符串和连接符+的理解,B 中 s[3]是一个 字符,而不能和一个字符串用连接符连起来。而 D 则是我们初学 java 时以为有 +必定有-,所以导致错误。java 中的连接符只有一个就是+。而且字符串和字 符是两个不同的概念,我们要区分开来。 2. Given the fo

文档评论(0)

1亿VIP精品文档

相关文档