Google+ Followers

Connect

Get Updates Via Email

Enter your email address:

Delivered by FeedBurner

Monday, 2 June 2014

How create directory or folder and Sub Folders in Java ?

Java Code Snippets

/**
* create single directory
*/
public static void CreateSingleDirectory(){
File file=new File("c:\\kumaran");
if(!file.exists()){
if(file.mkdir()){
System.out.println("Directory is created");
}
}
else{
System.out.println("File Already exist");
}
}

/**
* create multiple directory
*/
public static void CreateMultipleDirectory(){
File file=new File("c:\\kumaran\\projects\\project1");
if(!file.exists()){
if(file.mkdirs()){
System.out.println("Directories are created");
}
}
else{
System.out.println("Files are Already exist");
}
}

Output



AngularJS Hello world Text Input and ng-model

Code:

<!DOCTYPE html>
<html ng-app>
<head>
    <title>Hello World, Example</title>
    <script type="text/javascript"
        src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
     
    Write some text in textbox:
    <input type="text" ng-model="uservalue" />
    <h1>Hello {{ uservalue }}</h1>
     
</body>
</html> output: