• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to do examples  RSS feed

 
david branker
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am trying to do the examples in the textbook: OCA: Oracle®Certified Associate Java®SE 8 Programmer I Study Guide Exam 1Z0-808 and I can not figure out where and how to write the codes do I use notepad to create them and then cmd line to compile and execute like the HelloWorldApp example on the Oracle website. Or is there another way to do this. I'm starting to feel totally lost and that scares me since the class is only in week 1.I have never had any Java before this, I did have a basic program class but it mostly focused on pseudo code. Any help would be greatly appreciated. Thank you in advance for all your help. Dave B
 
Kris Gutie
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could do it on notepad but it's probably a lot simpler if you use a program. I like to use Dr. Java. Just Google it. You can download it from their website and it's free. If you need help I can always teach you java along side your book.
 
Frankie Law
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kris,  I understand how you feel.  I remember dabbling into programming when I was still in high school and nothing made sense. LOL

To start off.  It is probably best for you to know how to compile things traditionally before searching for the easy way out.
I am not going to go through what is Java.  I am sure your programming class can give you a better understand in this matter than I could.
But for now, I'll share with you how you can get your first program to compile.

First you need to install the Java SDK.  Which I assume that you already have it.  *There might be some tweaking that you needed to do before it actually compiles*

To compile, you need to have a written program with the file extension ending with .java
To create this .java file.  You can use any program that allows you to save it into .java
Notepad is great for learning as it does not come with all the technical help as you would in other environment.  If you are like me that wants to grind the hard learning curve.  Notepad is the way to go.

Once you have that .java file.  You will need to compile it in command prompt.

I assume you know how to navigate through command prompt.  Go to the directory where the .java file reside and give this command.

javac firstApp.java  - javac is the compiler command

when this is done, you will have a .class file in the same directory.

Then you will run by using "java firstApp"

Then you're done.  The rest of the technical knowledge, you'll learn in school. :3

Hope this helps.
 
Frankie Law
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oopps I mean david. xD
 
Knute Snortum
Sheriff
Posts: 4279
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a wiki entry on how to write your first program.  It may contain some useful information for you.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!