본문 바로가기

전체 글122

파일 시스템(NIO) ●Paths 와 Path 클래스 package org.example; import java.nio.file.Path; import java.nio.file.Paths; public class Main { public static void main(String[] args) { Path path = Paths.get("c:\\javastudy\\PathDemo.java"); System.out.println(path.getRoot()); System.out.println(path.getParent()); System.out.println(path.getFileName()); } } Root = C: Parent = C:\\ javastudy FileName = PathDemo.java ● 현재경로 // 현.. 2024. 2. 20.
c# 수업중 내용 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Runtime.InteropServices; using System.Text; using Systehttp://m.Threading.Tasks; using Systehttp://m.Windows.Forms; namespace WindowsFormsApp2 { public partial class Form1 : Form { int y = 40; int gak = 10; List listboxdata = new List() { "홍길동", "박.. 2024. 2. 19.
원 처럼 움직이기 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Runtime.InteropServices; using System.Text; using Systehttp://m.Threading.Tasks; using Systehttp://m.Windows.Forms; namespace WindowsFormsApp2 { public partial class Form1 : Form { int y = 40; int gak = 10; public Form1() { InitializeComponent(); t.. 2024. 2. 19.
문자 스트림 바이트 스트림이랑 똑같은데 사용하는 객체 생성이 다르다. package org.example; import java.io.FileReader; import java.io.FileWriter; public class Main4 { public static void main(String[] args) { try(FileWriter fw = new FileWriter("bb.txt")) { for (char i ='A';i 2024. 2. 19.