herrDeng網內搜尋

自訂搜尋

Ads

2013年5月21日 星期二

JAVA字串

輸入JAVA字串
輸出:
  1. 改為大寫
  2. 字串反轉

50 則留言:

B10133029 彭義竣 提到...

String x = new String("");
Scanner inputScanner = new Scanner(System.in);
x = inputScanner.nextLine();
StringBuffer strBuffer = new StringBuffer(x);
System.out.println(x.toUpperCase());
System.out.println(strBuffer.reverse());

b9833154徐瑋侖 提到...

import java.util.*;


public class abc {

public static void main(String[] args) {

System.out.println("請輸入");
Scanner a = new Scanner(System.in);
String b = a.nextLine();
StringBuffer sb = new StringBuffer();
sb.append(b);
sb.reverse();
System.out.println(String.valueOf(b).toUpperCase());
System.out.println(sb);
}

}

B9933122苑珮婕 提到...

import java.util.Scanner;
public class ex01 {
public static void main(String[] args) {
Scanner kb=new Scanner(System.in);
System.out.print("請輸入字串:");
String x=kb.nextLine();
System.out.println(x.toUpperCase());
StringBuffer Xb=new StringBuffer(x);
System.out.println(Xb.reverse());
}
}

B9933133張靖 提到...

import java.util.Scanner;

public class Test_01 {
public static void main(String[] args) {
Scanner kb = new Scanner(System.in);
System.out.print("請輸入字串:");
String x = kb.nextLine();
System.out.println(x.toUpperCase());
StringBuffer xu = new StringBuffer(x);
System.out.print(xu.reverse());
}
}

B10036036陸語萱 提到...

import java.util.Scanner;
public class ex01 {
public static void main(String[] args) {
Scanner kb=new Scanner(System.in);
System.out.print("請輸入字串:");
String x=kb.nextLine();
System.out.println(x.toUpperCase());
StringBuffer Xb=new StringBuffer(x);
System.out.println(Xb.reverse());
}
}

B10133021吳屹軒 提到...

import java.util.*;
import java.util.StringTokenizer;

public class aa {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133002 謝佩紋 提到...

import java.util.*;
import java.util.StringTokenizer;

public class ex1 {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133032黃徐琨 提到...

import java.util.*;
import java.util.StringTokenizer;

public class aa {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("小寫轉大寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133042沈俞宜 提到...

import java.util.*;
import java.util.StringTokenizer;

public class ket {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("小寫轉大寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133030林潔如 提到...

import java.util.*;
import java.util.StringTokenizer;
public class hello {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.print("請輸入:");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133005李沛澤 提到...

import java.util.*;
import java.util.StringTokenizer;

public class aa {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("小寫轉大寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133047鄭兆珊 提到...

import java.util.*;
import java.util.StringTokenizer;

public class san {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("小寫轉大寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133014 吳欣怡 提到...

import java.util.Scanner;
public class ex1 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String x=sc.nextLine();
System.out.println(x.toUpperCase());
StringBuffer xb=new StringBuffer(x);
xb.reverse();
System.out.println(xb);
}
}

B10133031 邱敏惠 提到...

import java.util.*;
import java.util.StringTokenizer;

public class java {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B9933179陳俊翰 提到...

import java.util.Scanner;

public class aaa {

public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String X=sc.nextLine();
System.out.println(X.toUpperCase());
StringBuffer Xb=new StringBuffer();
Xb.append(X);
Xb.reverse();
System.out.println(Xb);
}
}

B10133011黃怡蓁 提到...

import java.util.*;
public class hello {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
String x =input.nextLine();
System.out.println(x);
System.out.println("小寫轉大寫:"+x.toUpperCase());
System.out.print("字串反轉:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));}
System.out.println();
}

}

B9933180陳威羽 提到...

import java.util.Scanner;

public class aaa {

public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String X=sc.nextLine();
System.out.println(X.toUpperCase());
StringBuffer Xb=new StringBuffer();
Xb.append(X);
Xb.reverse();
System.out.println(Xb);
}
}

B10133048饒家華 提到...

import java.util.Scanner;
public class got {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String x=sc.nextLine();
String str=("abc");
System.out.println(str.toUpperCase());
String str1=("abc");
String X;
StringBuffer Xb=new StringBuffer(str1);
System.out.println(str1);
Xb.reverse();
System.out.println(Xb);
}
}

b10133045林玹安 提到...

import java.util.*;
import java.util.StringTokenizer;

public class apple {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
String x =input.nextLine();
System.out.println(x);
System.out.println(x.toUpperCase());
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

b10133016王致翔 提到...

import java.util.*;
import java.util.StringTokenizer;

public class MtcTW {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
String x =input.nextLine();
System.out.println(x);
System.out.println(x.toUpperCase());
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

b10133023徐顥 提到...

import java.util.*;
import java.util.StringTokenizer;

public class sam {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
String x =input.nextLine();
System.out.println(x);
System.out.println(x.toUpperCase());
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133009 王韋翔 提到...

import java.util.*;
public class ts1 {
public static void main(String[] args)
{
Scanner c=new Scanner(System.in);
String small=c.nextLine();
String big=small.toUpperCase();
System.out.println(big);

StringBuffer xb=new StringBuffer(big);
xb.reverse();
System.out.print(xb);
}

}

B10133053古聿穎 提到...

import java.util.Scanner;
public class StringBuffer {


public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String X=sc.nextLine();
System.out.println(X);
System.out.println(X.toLowerCase());

}

}

B10133046邱誌寬 提到...

import java.util.*;
class sor{
public static void main(String[]args){
Scanner ii=new Scanner(System.in);
String x=ii.nextLine();
System.out.println(x.toUpperCase());
StringBuffer xb=new StringBuffer(x);
xb.reverse();
System.out.println(xb);
}
}

B10133050張珈祥 提到...

import java.util.*;
public class ts1 {
public static void main(String[] args)
{
Scanner c=new Scanner(System.in);
String small=c.nextLine();
String big=small.toUpperCase();
System.out.println(big);

StringBuffer xb=new StringBuffer(big);
xb.reverse();
System.out.print(xb);
}

}

B10133051張丞緯 提到...

import java.util.*;
public class ex1 {
public static void main(String[] args)
{
Scanner c=new Scanner(System.in);
String small=c.nextLine();
String big=small.toUpperCase();
System.out.println(big);

StringBuffer xb=new StringBuffer(big);
xb.reverse();
System.out.print(xb);
}

}

B10133025王柏文 提到...

import java.util.*;
public class bbb {
public static void main(String[] args)
{
Scanner c=new Scanner(System.in);
String small=c.nextLine();
String big=small.toUpperCase();
System.out.println(big);

StringBuffer xb=new StringBuffer(big);
xb.reverse();
System.out.print(xb);
}

}

B10133013林子恩 提到...

import java.util.*;
public class pso2 {
public static void main(String[] args)
{
Scanner c=new Scanner(System.in);
String small=c.nextLine();
String big=small.toUpperCase();
System.out.println(big);

StringBuffer xb=new StringBuffer(big);
xb.reverse();
System.out.print(xb);
}

}

B10133008許耀文 提到...

import java.util.*;
public class aa1 {
public static void main(String[] args)
{
Scanner c=new Scanner(System.in);
String small=c.nextLine();
String big=small.toUpperCase();
System.out.println(big);

StringBuffer xb=new StringBuffer(big);
xb.reverse();
System.out.print(xb);
}

}

B10133036孫翊玲 提到...

import java.util.*;
public class aa {
public static void main(String[] args) {
Scanner sc = new Scanner (System.in);
String x=sc.nextLine();
System.out.println(x.toUpperCase());
StringBuffer xb=new StringBuffer(x);
System.out.println(xb.reverse());
}
}

B10133040溫翊惠 提到...

import java.util.*;
public class aa {
public static void main(String[] args) {
Scanner sc = new Scanner (System.in);
String x=sc.nextLine();
System.out.println(x.toUpperCase());
StringBuffer xb=new StringBuffer(x);
System.out.println(xb.reverse());
}
}

B10133004徐芷瑩 提到...

import java.util.Scanner;


public class hello123 {


public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String X=sc.nextLine();
System.out.println(X);
System.out.println(X.toUpperCase());

StringBuffer sb=new StringBuffer();
sb.reverse();
System.out.println(X+sb);
}

}

B10133010蔡以翎 提到...

import java.util.Scanner;


public class hello123 {


public static void main(String[] args) {
Scanner sc=new Scanner (System.in);
String X=sc.nextLine();
System.out.println(X);
System.out.println(X.toUpperCase());

StringBuffer sb=new StringBuffer();
sb.reverse();
System.out.println(X+sb);
}

}

B9833091陳孟偉 提到...

import java.util.Scanner;


public class NYPD {


public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String X=sc.nextLine();
System.out.println(X);
System.out.println(X.toUpperCase());

StringBuffer sb=new StringBuffer();
sb.reverse();
System.out.println(X+sb);
}

}

b10133015楊超文 提到...

import java.util.*;
import java.util.StringTokenizer;

public class aa {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
⋯⋯ System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}更多

b10133017張永憲 提到...

import java.util.*;
import java.util.StringTokenizer;

public class ex1 {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133038池侑承 提到...

import java.util.*;
import java.util.StringTokenizer;

public class aa {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
⋯⋯ System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133033呂之筠 提到...

mport java.util.*;
import java.util.StringTokenizer;

public class hello1 {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

b10133043陳宗霖 提到...

import java.util.*;
import java.util.StringTokenizer;

public class ex1 {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

b10133043 黃為邦 提到...

import java.util.*;
import java.util.StringTokenizer;

public class ex1 {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B9833102曾冠誌 提到...

import java.util.Scanner;
public class ex01 {
public static void main(String[] args) {
Scanner kb=new Scanner(System.in);
System.out.print("請輸入字串:");
String x=kb.nextLine();
System.out.println(x.toUpperCase());
StringBuffer Xb=new StringBuffer(x);
System.out.println(Xb.reverse());
}
}

B10133003王冠文 提到...

import java.util.*;
import java.util.StringTokenizer;

public class test {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("小寫轉大寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133044吳盛盟 提到...

import java.util.*;
import java.util.StringTokenizer;

public class app {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("小寫轉大寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133018翁湘姿 提到...

public class abc {

public static void main(String[] args) {

System.out.println("請輸入");
Scanner a = new Scanner(System.in);
String b = a.nextLine();
StringBuffer sb = new StringBuffer();
sb.append(b);
sb.reverse();
System.out.println(String.valueOf(b).toUpperCase());
System.out.println(sb);
}
}

B10133018翁湘姿 提到...

public class abc {

public static void main(String[] args) {

System.out.println("請輸入");
Scanner a = new Scanner(System.in);
String b = a.nextLine();
StringBuffer sb = new StringBuffer();
sb.append(b);
sb.reverse();
System.out.println(String.valueOf(b).toUpperCase());
System.out.println(sb);
}
}

B10133053古聿穎 提到...

import java.util.*;
import java.util.StringTokenizer;

public class aa {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("大寫轉小寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133049 連于瑄 提到...

import java.util.*;
import java.util.StringTokenizer;

public class aa {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.println("請輸入");
String x =input.nextLine();
System.out.println(x);
System.out.println("小寫轉大寫:"+x.toUpperCase());
System.out.print("文字顛倒:");
for(int i=x.length(); i>0; i--){
System.out.print(x.charAt(i-1));
}
System.out.println();
}
}

B10133034石嘉萱 提到...

import java.util.Scanner;
public class ex1 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String x=sc.nextLine();
System.out.println(x.toUpperCase());
StringBuffer xb=new StringBuffer(x);
xb.reverse();
System.out.println(xb);
}
}

B10133019 王騰侑 提到...

String x = new String("");
Scanner inputScanner = new Scanner(System.in);
x = inputScanner.nextLine();
StringBuffer strBuffer = new StringBuffer(x);
System.out.println(x.toUpperCase());
System.out.println(strBuffer.reverse());

B10133019 王騰侑 提到...

String x = new String("");
Scanner inputScanner = new Scanner(System.in);
x = inputScanner.nextLine();
StringBuffer strBuffer = new StringBuffer(x);
System.out.println(x.toUpperCase());
System.out.println(strBuffer.reverse());

Related Posts Plugin for WordPress, Blogger...

熱門文章