⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reverse.java

📁 it contains the practical programs in our college
💻 JAVA
字号:
import java.io.*;import java.net.*;public class Reverse {    public static void main(String[] args) throws Exception {	if (args.length != 2) {	    System.err.println("Usage:  java Reverse " +                               "http://<location of your servlet/script>" +                                " string_to_reverse");	    System.exit(1);	}	String stringToReverse = URLEncoder.encode(args[1], "UTF-8");	URL url = new URL(args[0]);	URLConnection connection = url.openConnection();	connection.setDoOutput(true);	OutputStreamWriter out = new OutputStreamWriter(                              connection.getOutputStream());	out.write("string=" + stringToReverse);	out.close();	BufferedReader in = new BufferedReader(				new InputStreamReader(				connection.getInputStream()));					String decodedString;	while ((decodedString = in.readLine()) != null) {	    System.out.println(decodedString);	}	in.close();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -