Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


DILEEPKRISHNA
coding
1 Answer(s)      3 years and a month ago
Posted in : Java Beginners


how to delete file after creating file


Advertisement
View Answers

July 18, 2011 at 12:24 PM


import java.io.*;
class  CreateAndDeleteFile
{
    public static void main(String[] args) 
    {
        try{
        File f=new File("C:/file.txt");
        f.createNewFile();
        System.out.println("File is created!");
        f.delete();
        System.out.println("File is deleted!");
        }
        catch(Exception e){
            System.out.println(e);
        }
    }
}


Related Tutorials/Questions & Answers:
coding
coding  I need the logout coding. can you please help me.   Please visit the following links: http://www.roseindia.net/quickguide/tomcat/Logout.shtml http://www.roseindia.net/jsp/loginstatus.shtml
program coding
program coding  how to rearrange the array a[1]. . a[n] even elements and odd elements? please give the example coding program.please provide the coding for this problem
Advertisements
coding for project
coding for project  hai how to write jsp coding for project smart accessories ...... that s to navigate to another page when you click on a tag
Java Coding
Java Coding  Hello, Can u please tel me how to improve my coding techniques.I am feeling difficulty with coding but I am perfect with my theory part
coding for chart
coding for chart  I want to convert a character into binary then convert it into its diagram in form of digital electrical signals.How can I do java coding for this diagram
coding of button
coding of button  What is code of fetching the value of button in a textbox using javascript
program coding
program coding  how to rearrange the array a[1]. . a[n] even elements and odd elements? please give the example coding program
coding C
coding C  Write a program for a GENERAL NUMBER CONVERTERS which include binary, decimal, octa and hexadecimal. You need to write the program using C language
need coding
need coding  sir i need code for simple bank application in jsp please send it   sir i need the coding for simple bank application in jsp.   Please visit the following link: Jsp Bank Application
coding in java
coding in java  write a code to calculate the product of odd integers from 1-15   class ProductOfOddIntegers { public static void main(String[] args) { long product=1; for(int i=1;i<=15;i
Coding with Ejb
Coding with Ejb  Hi Team, I am learning Ejb now. Can anybody help me how to implement this Stateful Session Bean Example by using this Hibernate example. Thanks in advance.   Sorry, actually I want simple code adding
coding shape
coding shape  i need to write a simple java program. the system must be in an applet and allows a user to choose whether to draw shapes such as circles, rectangles or lines on the screen. also, user can add circles by choosing
coding for login page
coding for login page  coding for login page
coding for anchor tags
coding for anchor tags  coding for anchor tags
coding for anchor tags
coding for anchor tags  coding for anchor tags
coding for anchor tags
coding for anchor tags  coding for anchor tags
coding for anchor tags
coding for anchor tags  coding for anchor tags
coding for online reservation
coding for online reservation  coding for online reservation
coding for updating profile
coding for updating profile  coding for updating profile
coding for forgot password
coding for forgot password  coding for forgot password
coding for update profile
coding for update profile  coding for update profile
coding for deleting file
coding for deleting file  coding for deleting file
CODING TEST
CODING TEST  Problem Statement Consider a inter dealer-broker network which various financial stock brokers use to execute customer stock trading... Coding productivity (more time you take to submit the exercise, lesser you
CODING TEST
CODING TEST  Problem Statement Consider a inter dealer-broker network which various financial stock brokers use to execute customer stock trading... Coding productivity (more time you take to submit the exercise, lesser you
Coding In Paradise
Coding In Paradise       Excellent and thoughtful AJAX tutorials and techniques by Brad Neuberg Read full Description
coding for logout - Development process
coding for logout  hi.. coding for logout using the session in jsp
coding for employee management system
coding for employee management system  coding for employee management system
coding for emloyee managent system
coding for emloyee managent system  coding for employee management system
coding for re-type password
coding for re-type password  coding for re-type password
Home page coding
Home page coding  coding fot html
Java coding - WebSevices
Java coding for web services  How to start Java Coding for web services
coding in jsp & servlet
coding in jsp & servlet  plz... provide me coding of "online examination system" in jsp & servlet
coding for gnerating timesheet
coding for gnerating timesheet  hi.... how to do coding for generating timesheet of the employees...working in the office
coding for railway reservation project
coding for railway reservation project  i want to help for creating coding in visual basic for railway reservation project
Coding for life cycle in threads
Coding for life cycle in threads  program for life cycle in threads
complete coding for shopping card
complete coding for shopping card  complete coding for shopping card   Please visit the following link: Shopping Cart Application
coding for eletric signal graph
coding for eletric signal graph  How can I draw an electric signal from Manchester and Differential Manchester coding from binary bits that converted from a character for example character
Medical coding training
Medical coding training  Hi, What is Medical coding training course? How anyone can make career in Medical coding training? Thanks   Hi, Medical coding training can be a good career for any graduate. It's one
coding - Java Beginners
coding  i need start coding but don't have any idea to start plz help me
coding problem - Java Beginners
coding problem  hi friend! Im new to jasper reports.how can i start that coding inorder to generate reports.can u send some sample programs for reporting?im badly need some clearly mentioned example because im new to jasper
Coding for forgot password
Coding for forgot password  coding for forgot password   Please go through the following links: http://www.roseindia.net/jsf/richfaces/ http://www.roseindia.net/struts/hibernate-spring/ Here you will find a jsf
j2me coding - Java Magazine
in sms using j2me. i have a problem in coding for sending and receiving sms .i have a coding for receiving sms but it not work because that program need sending... a coding for sending and receiving sms in j2me
 

 

 

DMCA.com