Jump to content
Sign in to follow this  
X-TERMINATOR

Leh Tanye Tak ?

Recommended Posts

rasanya Java takda command yang macam tue. Masa aku dulu tak silap aku guna while loop dgn \n je biggrin.gif guna

while(a < 32) { System.out.println("\n"); }
sebab jumlah kesemua ada 32 lines... rasanya lah btw soalan ni ada gak kat Internet... antara code yang "dasat":
import java.io.*;

public class A
{
public static void main(String[] args)
{
System.out.println("before");
try
{
Process aProc = Runtime.getRuntime().exec("cmd /c cmd");//for win 2k or higher

byte arr[]= new byte [5000];
BufferedInputStream is = (BufferedInputStream)aProc.getInputStream();

String connDir= new String();
is.read(arr);
connDir=new String(arr);
System.out.println(connDir);

}catch(Exception theException)
{
theException.printStackTrace();
}
System.out.println("after");
}
}

sumber: http://www.eknazar.com/Forums/archive/index.php/t-213.html cool.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...