Java help
0
Anyone know a good program to write for beginners for using java?
I would really appreciate someone point to me anywhere that have a list of possible coding/ tut if possible.
Please don't say notepad... that what my teacher tell me to use to write it x_x
currently using:
notepad++
textpad
& got JDK installed into my comp
P.S only reason I ask is because my teacher is making me write a program that do a temp convert using Celsius or Fahrenheit. Also he doesn't give outside recourse I can use or any help I can potentially use to finish this. Also this is my first time and first program that I try to write... soo making it easy to understand, is very appreciated.
This what I got so far...
keep getting error at
f = celciusString;
and
celciusString = getInputs();
any clue? Dx
I would really appreciate someone point to me anywhere that have a list of possible coding/ tut if possible.
Please don't say notepad... that what my teacher tell me to use to write it x_x
currently using:
notepad++
textpad
& got JDK installed into my comp
P.S only reason I ask is because my teacher is making me write a program that do a temp convert using Celsius or Fahrenheit. Also he doesn't give outside recourse I can use or any help I can potentially use to finish this. Also this is my first time and first program that I try to write... soo making it easy to understand, is very appreciated.
This what I got so far...
Spoiler:
keep getting error at
f = celciusString;
and
celciusString = getInputs();
any clue? Dx
1
A nice java editor for beginners is Bluej. It colors your code blocks, very minimalistic interface, drag and drop class management. This one might be better for you just by looking at your code level.
Most people use netbeans or eclipse once they get through the basics.
For those errors, you didn't declare f and celciusString before using them. You'll also get and error on celciusString = getInputs(); because you've declared your method as getInput without the 's'.
Most people use netbeans or eclipse once they get through the basics.
For those errors, you didn't declare f and celciusString before using them. You'll also get and error on celciusString = getInputs(); because you've declared your method as getInput without the 's'.
0
Netbeans and drjava.
Drjava is friendlier if you're just starting out.
Have you done your hello world yet?
Drjava is friendlier if you're just starting out.
Have you done your hello world yet?
0
SavageBJ wrote...
Have you done your hello world yet?hello what?
yeah... my teacher didn't even go over anything near that.
I saw a lot of it on the internet while I try to figure out how to write it though. It just a simple System.out.println() right?
Again this is the first coding(is that right term?) I'm currently learning atm... the only notes and help I get from that class was basically copy and paste half of my homework he wrote in class and the rest is on my own...
this is the homework code I need to make:
Spoiler:
really stupid as first program and homework idea -_-
best part is... he didn't teach us "if" statement or even go explain in deep what other do.
Edit:
apparently, according to my friends because of I start going into these thing before anything else. My friends have told me that I rush into it and my mind is not well developed as a coder... Is this true? do I need some sort of time to let all of this sink in and time to make my mind view the coding in different way??
here an update on what I have and change a lot of it thx to sciwhiz
Spoiler:
still getting symbol errors Q.Q
0
8-while(3)
Change this to a true or false, you can't put an int on a while statement. This will stop your program from even running.
10-Scanner keyboard = new Scanner(System.in);
15-int choice = in.nextInt();
Replace the line above with --> int choice=keyboard.nextInt();
You named the instance that you created of the scanner class as keyboard therefore you should be using keyboard when you're calling it again. This has a lot to do with objects and really it would take a massive wall of text if I have to explain it properly right here.
22-System.out.println("Enter the temperature in Fahrenheit:");
23-double fahrenString = 0.0;
25-fahrenString = Double.parseDouble(fahrenString);
^You never asked for input anywhere above
Also "Double.parseDouble(fahrenString)". What are you trying to do here? If its for formatting that should come later. I completely removed this in my version.
28-responseA = "HOT";
You have to declare the type for a variable which in this case is string.
so ----> String responseA="HOT";
but even then you need to output this
Simple saying responseA is equals to "HOT" will not display anything. Put a system out statement for here.
I think that's all. As much as I'd like to give you the fixed code, I don't want to do your homework for you since that won't really help you in the long run.
Change this to a true or false, you can't put an int on a while statement. This will stop your program from even running.
10-Scanner keyboard = new Scanner(System.in);
15-int choice = in.nextInt();
Replace the line above with --> int choice=keyboard.nextInt();
You named the instance that you created of the scanner class as keyboard therefore you should be using keyboard when you're calling it again. This has a lot to do with objects and really it would take a massive wall of text if I have to explain it properly right here.
22-System.out.println("Enter the temperature in Fahrenheit:");
23-double fahrenString = 0.0;
25-fahrenString = Double.parseDouble(fahrenString);
^You never asked for input anywhere above
Also "Double.parseDouble(fahrenString)". What are you trying to do here? If its for formatting that should come later. I completely removed this in my version.
28-responseA = "HOT";
You have to declare the type for a variable which in this case is string.
so ----> String responseA="HOT";
but even then you need to output this
Simple saying responseA is equals to "HOT" will not display anything. Put a system out statement for here.
I think that's all. As much as I'd like to give you the fixed code, I don't want to do your homework for you since that won't really help you in the long run.
0
SavageBJ wrote...
Spoiler:
thx for the help and i finally got it to work without any more errors
Spoiler:
0
kinsake wrote...
apparently, according to my friends because of I start going into these thing before anything else. My friends have told me that I rush into it and my mind is not well developed as a coder... Is this true? do I need some sort of time to let all of this sink in and time to make my mind view the coding in different way??
I won't lie, coding does take a bit of a mindset. I've taken several coding classes, starting with HTML then C/C++ and later C# and while I'm a bit rusty I know that it took a certain mindset to go at coding for hours. I have a bit of ADD and I can get bored pretty easily if I don't find something at all interesting. If you want to be good at coding, you need three things.
Interest - If you don't have interest in the materiel, or at least your grades; you're in trouble.
Spoiler:
Organization - No matter what type of coding you are doing, some things stay the same. Declaring variables, loading libraries and such. Keeping it organized will keep you (and your troubleshooters) sane.
Spoiler:
Finally, you need to be stubborn. Seriously. Don't give up. There are at least a dozen ways to go about any problem. Sometimes it helps to try a similar and simpler problem to see what you need to do, and then make the real (and more complicated) program. If you are having an issue with a bit of code, try doing it another way. (If you read the previous spoil, you might notice it's C#. I started with regular C, but couldn't remember how to do it. ^^; )
All I can say, is good luck and good studying. You'll need both. Oh, one more bit of advice: Never delete an old program. Keep them for reference because you never know if they'll come in handy. There's no shame in recycling code, its how I did my area program in that last spoil.
0
In many of the languages you come across, java being a big one at this, you're going to want to understand the concept of object oriented programming. Learning key concepts such as encapsulation, abstraction, polymorphism, inheritance/interfaces will aid you greatly when attempting to learn any OOP language.
Don't rush yourself however, more importantly, unless provided by an instructor (even then), try to make sure you understand what every piece of code you use is actually doing, why it's there, and the best way to make use of it.
Props on trying to brave it out with notepad++. IDE's such as BlueJ and Eclipse will surely come along your path further down the line as your code gets more and more complicated, which necessitates more organization and debugging power. If you avoid IDE's for now though it can help you get many more basic java fundamentals ingrained into your head quicker.
Don't rush yourself however, more importantly, unless provided by an instructor (even then), try to make sure you understand what every piece of code you use is actually doing, why it's there, and the best way to make use of it.
Props on trying to brave it out with notepad++. IDE's such as BlueJ and Eclipse will surely come along your path further down the line as your code gets more and more complicated, which necessitates more organization and debugging power. If you avoid IDE's for now though it can help you get many more basic java fundamentals ingrained into your head quicker.
0
Go to piratebay and enter the keyword Lynda.
You'll likely find a nice lynda java tutorial video there.
You'll likely find a nice lynda java tutorial video there.
0
When you have time I would suggest learning either emacs or vim(on linux) and then build your own IDE around them with various plugins.
Development Environments are very important, but most premade IDEs are very resource intensive and will make coding a real pain. Oh, and there is generally not as much plugin support for them either.
Just my two cents...
Development Environments are very important, but most premade IDEs are very resource intensive and will make coding a real pain. Oh, and there is generally not as much plugin support for them either.
Just my two cents...
0
kinsake wrote...
@Moeiful Do I really need to make one of my comp a linux os for vim?
Not for vim really. There is however an emacs for windows if you google for it. Don't concern yourself with these just yet though in my opinion if you've only just started beginner java.
0
Rovencrone wrote...
kinsake wrote...
@Moeiful Do I really need to make one of my comp a linux os for vim?
Not for vim really. There is however an emacs for windows if you google for it. Don't concern yourself with these just yet though in my opinion if you've only just started beginner java.
I'm just started Java not to long ago... not even month yet. But at the rate my teacher going, if I don't get better fast i might fail the class. Really curious what the other computer class might be if this is just intro to computer science -_-
0
kinsake wrote...
Rovencrone wrote...
kinsake wrote...
@Moeiful Do I really need to make one of my comp a linux os for vim?
Not for vim really. There is however an emacs for windows if you google for it. Don't concern yourself with these just yet though in my opinion if you've only just started beginner java.
I'm just started Java not to long ago... not even month yet. But at the rate my teacher going, if I don't get better fast i might fail the class. Really curious what the other computer class might be if this is just intro to computer science -_-
Well, Stack overflow and google are a great place for info. Your best source of info on available classes and methods will continue to be JavaDocs and asking questions/working with your professor is always a good idea too.
Higher level programming classes will have you continue develop fundamental ideas and concepts, and of course new languages will be thrown in there. Your first class may or may not suck since you'll be trying to get used to syntax, but once you get that down you can focus on logic and whatnot, which will come instinctively and hit you in the face like a truck if you think about it hard enough.
Keep in mind though, computer science will branch off into different fields later on. Early CS classes have many prerequisites for other majors too, and as such you shouldn't feel too burdened in an intro class. I ended up changing my major from business/math minor to Computer Science, to Applied Computing Technologies Education.
0
Spoiler:
Thx for the info. And I doubt I can get much help from this professor, considering the fact 90% of the class kind of give on the class and the lack of resource we can use outside/in-class of class (as in textbooks, after school session or online contact with the professor.)
[size=9]Plus I'm not sure if I can pass this class when this professor have points taken away from my work when I didn't have the "correct" color layout for some of the assignment. Which wasn't specify or mention anywhere on the direction and it was a whole letter grade off. the only reason he give me is, "it not the same as the preview layout color..." which was in a small bobble in the corner on the first page. it was in red while mine was orange...[/h]