close
import javax.swing.*;
public class oo {
public static void main( String args[] )
{
String letters = "abcdefghijklmabcdefghijklm";
String output = "Substring from index 20 to end is " +
""" + letters.substring( 20 ) + """;
output += "Substring from index 3 up to 6 is " +
""" + letters.substring( 3, 6 ) + """;
JOptionPane.showMessageDialog( null, output,
"String substring methods", JOptionPane.INFORMATION_MESSAGE );
System.exit( 0 );
}
}
public class oo {
public static void main( String args[] )
{
String letters = "abcdefghijklmabcdefghijklm";
String output = "Substring from index 20 to end is " +
""" + letters.substring( 20 ) + """;
output += "Substring from index 3 up to 6 is " +
""" + letters.substring( 3, 6 ) + """;
JOptionPane.showMessageDialog( null, output,
"String substring methods", JOptionPane.INFORMATION_MESSAGE );
System.exit( 0 );
}
}
全站熱搜
留言列表