📄 stringconcat.java
字号:
import javax.swing.*;
public class StringConcat {
public static void main( String args[] )
{
String s1 = new String( "Happy " ),
s2 = new String( "Birthday" ),
output;
output = "s1 = " + s1 +
"\ns2 = " + s2;
output += "\n\nResult of s1.concat( s2 ) = " +
s1.concat( s2 );
output += "\ns1 after concatenation = " + s1;
JOptionPane.showMessageDialog( null, output,
"Demonstrating String Method concat",
JOptionPane.INFORMATION_MESSAGE );
System.exit( 0 );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -