Дополнен 1 год назад
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
new TestFrame();
}
});
}
}
class toUpper{
public static String toUpper(String input) {
String [] tmpArr = input.split(" ");
String result = "";
for (int i = 0; i < tmpArr.length; i++){
if(tmpArr[i].length() > 1){
char oldFirst = tmpArr[i].charAt(0);
result += tmpArr[i].substring(0,1).toUpperCase() + tmpArr[i].substring(1,tmpArr[i].length()) + " ";
}
}
return result;
}
}
class reverse{
public static String reverse(String inputString){
int stringLength = inputString.length();
String result = "";
for (int i = 0; i < stringLength; i++){
result = inputString.charAt(i) + result;
}
return result;
}
}
class replace{
public static String replace(String inputString){
int stringLength = inputString.length();
String result = "";
char oldChar = name;
for (int i = 0; i < stringLength; i++){
result = replace(oldChar, #);
}
return result;
}
}