Mark Roberge

Ranch Hand
+ Follow
since Jul 31, 2022
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mark Roberge

I put this into my code:
public static void main(String args[])
Then I got another problem. public double area(double a, double b, double c) this in bluej no longer works.
Before I put in the main string everything compiled without errors.
2 years ago
Then how do I make it executable?
2 years ago
I just have a red block at this line of code there is nothing else to say.
I clicked on it and got an illegal start of expression.


Code:
public double area(double a, double b, double c)
2 years ago
I fixed it with adding a main line of code but now have a problem with the public double area(double a,  double b, double c){
2 years ago
here is the code:


I might need a public void int main [] This code compiled without errors.
2 years ago
HI,
I am reading this book called Learn Java with Blue J. Every so often I get jammed up with not being able to run a program. For example, I wrote a program called Area Overload. It compiled. Then when I went to run the program there was nothing I could click on to run the program. For example, I get new area overload. The red icon has the following, inherited from object, double area, double area(int a, int b, int c.)
The code compile fine. I have insomnia and forget things but I go back to the point in the book to where the instructions are to run the code. I can't run some of my programs.
I tried to copy a screenshot to this post and it didn't work.
2 years ago
I am most familiar with PHP. Classes in PHP can be placed in an include file and called into the program with an include or require. And yes I am referring to top to bottom.
2 years ago
By inline I am talking about the flow of the code. From top to bottom.
2 years ago
OK, why is it in Java they us a1.mass for example, to make a variable?  I have studied PHP and variables use a $ to distinguish a variable from other items in the code.

Something else that I have noticed is that in Java all of the classes are in line with the rest of the code. In php I can write all of the classes I want store them in my includes folder and when I call on that file all of the classes are brought into the main file and ready to be used. I see java as somewhat confusing on this point.
2 years ago
never mind I found the print details section.
2 years ago
HI People,
I have not run this code yet.



I am going to assume that line 1. is setting up the class.
Line 2. is the start of the program, I think. Or it is the beginning of the class. Pick one please.
Line 3. is very much like php. It calls the class into action, instantiation, I think.
Line 4. just prints out Apple a1
Line 5. Here is where I am getting confused. How does this work a1.printDetails ? I don't see anything to tell me what is going to print out. If I did this in php I would have to have printDetails some where else.
line 7. is an assignment that puts 10.0f a floating point number
line 8. is another assingment
I am going to skip the obvious
line 11. again a1.printDetails where, what, how does this work.


Thanks for your help. I tried to be neat.
Mark


2 years ago
10 years ago is a long time in the software world. There has been lots of improvement since then.
2 years ago
HI,
I am learning Java. I found this great IDE for beginners like myself. BlueJ. It is very easy to use. It allows you to concentrate on Java and not on the ide like Eclipse. If your new to java this is the way to go. Check it out. This link is a tutorial. https://bluej.org/tutorial/tutorial-201.pdf. This link is for the ide. https://bluej.org/
Mark
2 years ago
First, Tim and Frank, Thanks. I have found an ide that is simple to use. BlueJ. It is a simple ide for beginners. Yet it is still a powerful ide. It allows you to focus on learning to code.
I found a solution to the Eclipse problem. I did a search and found that people are reinstalling Eclipse and achieving success. For now I am going to stick with Blue J.
Thanks for all of your help guys.
Marki
2 years ago
Yeah not interested in apple. I was just thinking that if I learn java first then the android ide will be much less difficult. What about JCreator or BlueJ?
2 years ago