目录

next()

++运算符为类String调用此方法。 它会递增给定String中的最后一个字符。

语法 (Syntax)

String next()

参数 (Parameters)

没有

返回值 (Return Value)

字符串的新值

例子 (Example)

以下是此方法的使用示例 -

class Example { 
   static void main(String[] args) { 
      String a = "Hello World"; 
      println(a.next());         
   } 
}

当我们运行上述程序时,我们将得到以下结果 -

Hello World
↑回到顶部↑
WIKI教程 @2018