The C# Programing Language 1장 1장 1. Hello World! using System; namespace study2 { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } } 모든 프로그래밍을 시작할 떄 시작하는 Hello World 출력문. 위 소스를 컴파일하면 .exe의 어셈블리를 만들어 낸다. 그리고 실행시키면 Hello World! 를 출력한다. * 어셈블리 컴파일 과정에서 만들어진 어셈블리는 CLR에서 실행할 수 있는 코드이다. .NET 프레임워크에서 실행할 수 있는 코드이며 가상 공간에서 실행된다, 어셈블리의 결과물은 .exe와 .dll이다. 위 소스는 using 지시문으로 System 네임스페이스를 참조하는 구문.. 더보기 2학기 중간고사 import javax.swing.JOptionPane; class Rectangle { double length=1, width=1; // 생성자 public Rectangle(){} // Get 메소드 public double get_length() { return length; } public double get_width() { return width; } // Set 메소드 public void set_length(double length_in) { if(0 < length_in && length_in < 50) length = length_in; } public void set_width(double width_in) { if(0 < width_in && width_in < 50) width .. 더보기 자바 다이얼로그 틀 import javax.swing.JOptionPane; public class test { public static void main(String[] args) { Random ran = new Random(); // 방법 2 JOptionPane windows = new JOptionPane(); windows.showMessageDialog(null, "", "Houkibosi", JOptionPane.ERROR_MESSAGE); } } 더보기 이전 1 ··· 46 47 48 49 50 51 52 ··· 63 다음