• Post Reply Bookmark Topic Watch Topic
  • New Topic

Opinions/Not sure I have the code correct  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm thinking of making a tshirt design with this code on it, but not sure if it's actually a good idea or not and not sure if I have the code right/it makes sense. I'm just a beginner.

 
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one good way to find out if it is right is to write a quick program with this code and see if it does what you want...
 
Michelle Purdy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be good if I knew what I was doing and could do that! Java confuses me. I tried it with BlueJ and I couldn't even get it to compile.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you write a Hello World program, compile it, and run it?

Folks around here LOVE to help...but we can't if you just say "It doesn't work."

Make it easy for us to help you, and you'll be amazed at how much help you get.
 
Michelle Purdy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I can't. It's been since March that I've had a Java class and I just can't remember how to do it. Maybe what I've written is JavaScript?? I'm so confused right now.
 
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michelle Purdy wrote:No, I can't. It's been since March that I've had a Java class and I just can't remember how to do it. Maybe what I've written is JavaScript?? I'm so confused right now.

Well, unconfuse yourself and stop panicking, because that's what it sounds like you're doing right now - and it's not productive.

Sounds to me like you need a refresher, so before you write one more line of Java code, look at the tutorials (the index is here).

Then, sit down and plan what you want to do. Code doesn't just write itself.

Winston
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am not sure of the point here. Is this code for a T-Shirt? meaning that it will be printed on the T-Shirt ??

If so, does it really matter if it compiles? ... ... it looks close enough. After all, isn't it supposed to be just a snippet?

Henry
 
Michelle Purdy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it would be printed on a tshirt. I just wanted to be sure it makes sense. When I wrote it I thought I wrote it correctly, but I didn't want to print it on a shirt and it be wrong and look stupid! lol
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd say there's a couple ways to look at this then...

1) You are creating your own language, with your own rules. Nothing there says it IS java...it could just be a java-like language.

or

2) You want it to be real java code. In that case, you have to spec out what you would WANT it to do, if it were real.

This code will basically print that question over and over until the input isn't one of the three answers.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!