Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package cmpe211lab7hw3;
- import java.io.*;
- public class Ugur {
- public static void main(String args[]) throws IOException {
- FileOutputStream out = null;
- int[] arr = new int[100];
- for (int i = 0; i < 100; ++i) {
- arr[i] = (int) (Math.random() * 101);
- }
- try {
- out = new FileOutputStream("Example.txt");
- int c;
- for (int i = 0; i < 100; ++i) {
- out.write(arr[i]);
- }
- } finally {
- if (out != null) {
- out.close();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement