Notice
Recent Posts
Recent Comments
Link
목록mkdir() (1)
SeouliteLab
[Java/자바] 디렉토리(폴더) 생성하는 3가지 방법
Java에서 디렉토리(폴더)를 생성하는 다양한 방법을 알아보겠습니다. 각 방법은 예제와 함께 자세히 설명됩니다. 예제 1: File 객체의 mkdir() 메서드 사용 import java.io.File; public class DirectoryCreationExample { public static void main(String[] args) { String directoryPath = "C:\\example_directory"; File directory = new File(directoryPath); if (!directory.exists()) { directory.mkdir(); System.out.println("디렉토리 생성됨: " + directoryPath); } else { System.o..
프로그래밍
2024. 3. 8. 08:55