
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

1. Lets look at JDK a. You can find your jdk inside the jbuilder7 folder most probably at C:\ drive otherwise check other drives b. What is the version of JDK on your system c. Find out javac and java in jdk/bin folder 2. Writing your first Program a. Open notepad and type helloworld program b. Save the file as helloworld.java [be carefull notepad usually saves files as .txt ] c. Open command prompt by typing cmd in windows start-run utility d. Change your directory to [ jbuilder7\jdk1.3.1\bin] e. On command prompt write [javac ] following it write complete path and file name with extension of your helloworld.java [use slides for help] f. If there are no errors in your program nothing will be displayed and you will get the command prompt again g. Type java and name of your helloworld file (without extension) with complete path h. Did you get the out put [if not ask for help] 3. Try helloworld program with the following changes System.out.println(“Hello”+”world”); System.out.println(“This is a long sentence and cannot be written on a single so have to write it on at least two line, writing this way seems an error”); System.out.println(“This line will not \n print on single \line “); System.out.print(“This text should print”); System.out.print(“On single “); System.out.print(“Line Strange..”); 4. Try to write program for the following a. Convert the age of your friend in months days and print b. How many leap years have been passed up-to 20004 c. Create arrays of different data types and print them **5. Familiarize yourself with the use of various operators