월요일, 12월 23
Shadow

미분류

#010 Create Your Own Java Classes

미분류
Lab Exercises Exercise 1: Create an object instance of a class using "new" keyword (30 minutes) Exercise 2: Static variables and static methods (30 minutes) Exercise 3: Overloading (20 minutes) Exercise 4: Constructors (20 minutes) Exercise 5: "this" reference (20 minutes) Exercise 6: Access modifiers (20 minutes) Homework Exercise (for people who are taking Sang Shin's "Java Programming online course")   Exercise 1: Create your own class So far, you have dealt with a single class that contains main(..) method.  In this exercise, you are going to create multiple classes among which one class invokes another class - more precisely, a method in a class invokes a method of another class. Build and run an application that uses newly created StudentRecord class...

#009 Tour of java.lang.* and java.util.* classes

미분류
Lab Exercises Exercise 1: Boolean class, Various data types, Date class, Math class (20 minutes) Exercise 2: System properties (20 minutes) Exercise 3: System class (20 minutes) Exercise 4: Runtime class (20 minutes)   Exercise 1: Boolean class, Various data types, Date class, Math class In this exercise, you are going to use various classes. Boolean class Various data types Date class Math class (1.1) BooleanWrapper 1. Create a new NetBeans project Select File->New Project (Ctrl+Shift+N). The New Project dialog box appears. Under Choose Project pane, select General under Categories and Java Application under Projects.  Click Next. Under Name and Location pane, for the Project Name field, type in BooleanWrapper as project name. For C...

#008 Using Built-in Java Classes

미분류
Lab Exercises Exercise 1: Create an object instance of a built-in class using "new" keyword (20 minutes) Exercise 2: Static method and instance (non-static) method (20 minutes) Exercise 3: Pass by value and pass by reference parameter passing (20 minutes) Exercise 4: Scope of variables (20 minutes) Exercise 5: Type casting of primitive types and Wrapper class (20 minutes) Exercise 6: Comparing objects (20 minutes) Exercise 7: getClass() method and InstanceOf Operator (20 minutes) Homework Exercise (for people who are taking Sang Shin's "Java Programming online course")   Exercise 1: Create an object instance of a class using "new" keyword In this exercise, you will exercise the concept object instance creation using "new" keyword.  You will learn how you are g...

#007 Command-line arguments

미분류
  Lab Exercises Exercise 1: Read command-line arguments (20 minutes) Exercise 2: Read command-line arguments using NetBeans (10 minutes) Homework Exercise (for people who are taking Sang Shin's "Java Programming online course")   Exercise 1: Read command-line arguments Build and run Hello Java program that receives command-line arguments Read numbers as command-line arguments (1.1) Build and run Hello Java program that receives command-line arguments 1. Go to a directory where you want to create Java program C:\>cd \myjavaprograms 2. Write HelloCommandLineArguments.java using your editor of choice such as notepad on Windows platform or gedit on Solaris platform (in this example, I am using jedit) as shown in Code-1.10 below. C:\myjavaprograms&...

#006 Java Array

미분류
Lab Exercises Exercise 1: Build and run Java programs that use Java array of int (30 minutes) Exercise 2: Build and run Java programs that use Java array of String (30 minutes) Homework Exercise (for people who are taking Sang Shin's "Java Programming online course")   Exercise 1: Build and run Java programs that use Java array of int In this exercise, you are going to build  simple Java applications that use  array  of int. Build and run a Java program that uses single-dimensional array of int Build and run a Java program that uses two-dimensional array of int Build and run a Java program that computes the greatest number  (1.1) Build and run a Java program that uses single-demensional array of int 1. Create a NetBeans project Select File from top-lev...

#005 Java Controls

미분류
  Lab Exercises Exercise 1: if/else control structure (20 minutes) Exercise 2: for loop (20 minutes) Exercise 3: While loop (20 minutes) Homework Exercise (for people who are taking Sang Shin's "Java Programming online course")   Exercise 1: if/else control structure In this exercise,  you will learn how to write a Java program that uses if/else control structure. Build and run a Java program that uses if/else control structure Build and run 2nd Java program that uses if/else control structure (1.1) Build and run a Java program that uses if/else control structure 1.  Open MyGradesProject NetBeans project. Select File->Open Project (Ctrl+Shift+O). Observe Open Project dialog box appears. Browse down to <LAB_UNZIPPED_DIRECTO...

#004 Getting input from keyboard

미분류
Lab Exercises Exercise 1: Getting input from keyboard via BufferdReader (30 minutes) Exercise 2: Getting input from keyboard via JOptionPane (30 minutes) Homework Exercise (for people who are taking Sang Shin's "Java Programming online course")   Exercise 1: Getting input from keyboard via BufferedReader class In this exercise, you are going to build a simple interactive Java application, which gets user entered input data from keyboard. The program will use BufferedReader and InputStreamReader classes to receive the intput data. (You don't really need to understand in detail how these classes work, however.)  You will also learn how to use Javadoc to get more information on Java classes. Build and run GetInputFromKeyboard Java program Convert user entered Strin...

#003 Java programming basics

미분류
Lab Exercises Exercise 1: Declare, Initialize, Print variables (30 minutes) Exercise 2: Conditional operator (30 minutes) Exercise 3: Averaging numbers (20 minutes) Exercise 4: Find greatest number (20 minutes) Homework Exercise (for people who are taking Sang Shin's "Java Programming online course")   Exercise 1: Declare, Initialize, Print variables   In this exercise, you are going to learn how to declare, initialize a variable.  You also learn how to modify and display a value of a variable. Build and run OutputVariable Java program using NetBeans IDE Build and run OutputVariable Java program using "javac" and "java" command (1.1) Build and run OutputVariable Java program using NetBeans IDE 0. Start the NetBeans IDE if you have not done so. 1...

#002 Introduction to Java technology

미분류
   javaintro.pdf Java"Java" generally refers to a combination of three things: the Java programming language (a high-level, object-oriented programming language); the Java Virtual Machine (a high-performance virtual machine that executes bytecodes on a specific computing platform, typically abbreviated JVM); and the Java platform, a JVM running compiled Java bytecodes, usually calling on a set of standard libraries such as those provided by Java Standard Edition (SE) or Enterprise Edition (EE). Though coupled by design, the language does not imply the JVM, and vice versa. In this Article The Java Programming Language The Java Platforms The Java Virtual Machine The JVM Without Java The Java Community Process Conclusions We recently received an email asking for a "...

#001 Java 첫번째 이야기 – javapassion.com

미분류
워낙 유명한 신상철 박사님의 사이트 javapassion에서 공부한지 벌써 1년이 다되어 가지만 항상 하다가 끊기고 하다가 끊기고 해서 이번주 ~ 마음을 잡고 처음부터 한번 다시 도전을 해보기로 했다. 새해가 된 만큼 열심히 노력해서 꼭 가고 싶은 회사에 들어가고야 말곘다라고~~ 사이트는 이렇게 생겼다.  이번주내로 javase는 끝낼수 있도록 해보자~~ 파이팅~