-1
import java.io.FileInputStream;
import java.io.FileOutputStream;
class FileInput
{
public static void main(String args[])
{
try{
FileOutputStream fout= new FileOutputStream("a.txt");
FileInputStream fin=new FileInputStream("a.txt");
String str="1234";
byte a[]=str.getBytes();
fout.write(char(a));
fout.close();
int i=0;
while((i=fin.read())!=-1)
{
System.out.println((i));// This is printing in ascii value i want to display as string
}
fin.close();
}
catch(Exception e)
{
System.out.println(e);
}
}
}
はこの試してください: 'のSystem.out.println(新しい文字((チャー)私は));' –
は 'FOUTをい.write(char(a)); 'あなたのために働く? – nullpointer