Aplicatie Java Clasarandomaccessfile

  • Uploaded by: deianira
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Aplicatie Java Clasarandomaccessfile as PDF for free.

More details

  • Words: 85
  • Pages: 1
//Aplicatie Java cu fisiere

//aplicatie Java care lucreaza cu clasa RandomAccessFile ;import java.io.RandomAccessFile; //declararea si crearea unei instante File // separatori de fisiere : \\ inseamna \ -folosit in Windows; / in Linux

import java.io.*; public class AplicatieClasaRandomAccessFile { public static void main (String[] args) { //declararea si crearea unei instante RandomAccessFile try { RandomAccessFile f1=new RandomAccessFile("iesire.bin","rw"); String sir="A fost odata ca niciodata,ca daca n-ar fi fost nu s-ar fi povestit"; f1.writeUTF(sir); f1.close();} catch (IOException e) { System.out.println("Eroare la scrierea in fisier"); } } }

Related Documents


More Documents from ""

May 2020 18
Prefixoide
December 2019 12
Kirac-siyah Gece Lyrics
December 2019 17