Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Hello World problem

Reply
Thread Tools

Hello World problem

 
 
John Dildy
Guest
Posts: n/a
 
      11-30-2012
I have entered the Hello World file correctly but I am told I am missing a semicolon in line 1 when I attempt to run the file.

Here is my script:

https://script.google.com/d/1Agf_C5E...bcyuMo9iI/edit

Anyone able to help me understand where exactly I have to put the semi colon at?

Thank you in advance
John Dildy
 
Reply With Quote
 
 
 
 
FredK
Guest
Posts: n/a
 
      11-30-2012
On Friday, November 30, 2012 7:19:44 AM UTC-8, John Dildy wrote:
> I have entered the Hello World file correctly but I am told I am missing a semicolon in line 1 when I attempt to run the file. Here is my script: https://script.google.com/d/1Agf_C5E...bcyuMo9iI/edit Anyone able to help me understand where exactly I have to putthe semi colon at? Thank you in advance John Dildy


That's not java
 
Reply With Quote
 
 
 
 
Tim Slattery
Guest
Posts: n/a
 
      11-30-2012
John Dildy <(E-Mail Removed)> wrote:

>I have entered the Hello World file correctly but I am told I am missing a semicolon in line 1 when I attempt to run the file.
>
>Here is my script:
>
>https://script.google.com/d/1Agf_C5E...bcyuMo9iI/edit
>
>Anyone able to help me understand where exactly I have to put the semi colon at?


Here's what I see there:

function myFunction() {

}

That looks like JavaScript, not Java. They are very different things.
Which are you actually trying to use?

Assuming it's JavaScript, you have an empty function. It looks to me
like it should run, but it wouldn't do anything. How did you try to
run it?

If you are trying to use JavaScript, this conversation should move to
comp.lang.javascript

--
Tim Slattery
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-30-2012
On Fri, 30 Nov 2012 07:19:44 -0800 (PST), John Dildy
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone who
said :

>
>https://script.google.com/d/1Agf_C5E...bcyuMo9iI/edit
>
>Anyone able to help me understand where exactly I have to put the semi colon at?


see http://mindprod.com/jgloss/helloworld.html if you want to write a
HelloWorld in Java.

I don't think that is what you want to do, however. You have Java
confused with some other language.
--
Roedy Green Canadian Mind Products http://mindprod.com
Students who hire or con others to do their homework are as foolish
as couch potatoes who hire others to go to the gym for them.
 
Reply With Quote
 
John Dildy
Guest
Posts: n/a
 
      12-02-2012
I have made changes to the project and I don't see the empty Javascript function. However, I am trying to use Java.

Does anyone know if there is a beginner's group on google about Java and/or Javascript. I see to be contacting people that are way a way's from the HelloWorld.java
 
Reply With Quote
 
Arne Vajhj
Guest
Posts: n/a
 
      12-02-2012
On 12/1/2012 9:45 PM, John Dildy wrote:
> I have made changes to the project and I don't see the empty Javascript function. However, I am trying to use Java.
>
> Does anyone know if there is a beginner's group on google about Java and/or Javascript. I see to be contacting people that are way a way's from the HelloWorld.java


comp.lang.java.help may be a bit more beginner friendly than
comp.lang.java.programmer!

comp.lang.javascript sounds as if it is a good place for
JavaScript, but I have never read it.

Arne

 
Reply With Quote
 
Joerg Meier
Guest
Posts: n/a
 
      12-02-2012
On Sat, 1 Dec 2012 18:45:06 -0800 (PST), John Dildy wrote:

> I have made changes to the project and I don't see the empty Javascript function. However, I am trying to use Java.


> Does anyone know if there is a beginner's group on google about Java and/or Javascript. I see to be contacting people that are way a way's from the HelloWorld.java


Java is not related to Javascript. As you have posted on

https://script.google.com/d/1Agf_C5E...bcyuMo9iI/edit

your project files end with .js, which is Javascript, and not .java, which
is Java. Your code also contains "function myFunction()", which is a
Javascript function, and not a Java method.

I'm afraid you really are completely in the wrong place here. Despite the
strange similarity in name, Java and Javascript really are not related AT
ALL. This isn't like Basic and Visual Basic, two versions of the same
language, Java and Javascript are as unrelated as Georgia, USA and Georgia,
the country next to Russia.

People here are of course perfectly capable of "Hello World" examples, but
only in the language of this newsgroup - which is Java. We don't know
anything at all about Javascript (other than by random chance).

That being said, even people in a Javascript help group won't be able to
help you if you ignore peoples replies. Multiple people have asked you
questions about your attempted "Hello World" example, yet you have answered
none. If you are looking for mind readers, you might have to go look for a
different newsgroup alltogether.

Liebe Gruesse,
Joerg

--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
 
Reply With Quote
 
John Dildy
Guest
Posts: n/a
 
      12-03-2012
For some reason the Google Script is messing with my file which I clearly classified it as .java instead of .js (javascript)

I have done the same with eclipse and I have gotten the right output in the HelloWorld.java file.

Thank you for giving some information out.
 
Reply With Quote
 
Joerg Meier
Guest
Posts: n/a
 
      12-03-2012
On Sun, 2 Dec 2012 17:51:39 -0800 (PST), John Dildy wrote:

> For some reason the Google Script is messing with my file which I clearly classified it as .java instead of .js (javascript)


That's because Google Script is a Javascript scripting language.

Liebe Gruesse,
Joerg

--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      12-04-2012
On 12/2/2012 6:05 AM, Martin Gregorie wrote:
> On Sat, 01 Dec 2012 22:39:38 -0500, Arne Vajhøj wrote:
>
>> On 12/1/2012 9:45 PM, John Dildy wrote:
>>> I have made changes to the project and I don't see the empty Javascript
>>> function. However, I am trying to use Java.
>>>
>>> Does anyone know if there is a beginner's group on google about Java
>>> and/or Javascript. I see to be contacting people that are way a way's
>>> from the HelloWorld.java

>>
>> comp.lang.java.help may be a bit more beginner friendly than
>> comp.lang.java.programmer!
>>
>> comp.lang.javascript sounds as if it is a good place for JavaScript, but
>> I have never read it.
>>

> I visited some years ago. Not a friendly place.


Hm.

Dislike of beginners or narrow definition of on topic?

> In any case, I don't think its a suitable language for a programming
> newbie: maybe things have changed, but I wasn't able to find a good book
> to learn it up from. I was looking for something like the O'Reilly
> Python, PHP or awk&sed books, but could find nothing apart from
> collections of code snippets and definitely nothing with a coherent
> description of its syntax and run-time environment.


I have not read it myself but Professional JavaScript for Web Developers
from Wrox get good reviews and I have good experience with their
Professional Xxxxxxx books.

And ECMA-262 is not hard to read. It is a lot easier than JLS.

Runtime environment is a bit more tricky, because it somewhat
depends on the runtime.



Old IE, new IE, FF, Chrome, node.js etc. are not identical.

Arne


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
regular expression to parse {"hello", "hello world","1hello-2*hello"} Roy Java 6 01-07-2008 08:06 PM
to print in the reverse order, ("Hello World" -> "World Hello") vijay C Programming 8 04-26-2005 02:11 AM
The world's shortest 'Hello World!' program: a proposal Larry Perl Misc 27 01-25-2005 07:53 PM



Advertisments