program does not work fine . Nothing display's on cmd.
also i done using same file name for input stream and output stream
User Profile
Collapse
-
FileInputStream and FileOutputStream
import java.io.*;
class output
{
public static void main(String args[])throws Exception
{
try
{
FileInputStream fis=new FileInputStream ("D:/R R/New Folder2/unit3/b.txt");
FileOutputStrea m fos=new FileOutputStrea m("D:/R R/New Folder2/unit3/a.txt");
int d;
while((d=fis.re ad())!=-1)
{
fos.write(d);
}
fis.close();... -
well this is part of data structure in java
topic named is Selection sorting
n tnx for replying u r answer will be well appretiatedLeave a comment:
-
-
Java Error ArrayIndexOutOfBoundsException
Code:class selection { public static void sort(int arr[]) { for(int i= arr.length;i>0;i++) { int m=0; for(int j=1;j<=i;j++) { if(arr[j]>arr[m]) { m=j; } } int temp= arr[i]; arr[i]= arr[m]; arr[m]= temp; } System.out.println("Array After Sort : "); System.out.print("{");
No activity results to display
Show More
Leave a comment: