Silly java test question

Soldato
Joined
7 Aug 2004
Posts
11,260
if you had to answer:

Java is different from other languages like C and C++ because it does not create machine and operating system specific code. Instead it creates _____________ that can be run on many platforms

what would you say ?
 
Go and read up on what the Java Virtual Machine is. This will help you understand why a program compiled in C++ to a windows executable won't run on Linux but Java code compiled to a jar (not the answer btw) file probably will. University is about learning yourself, you won't get very far if you can't do this because it is a key part of university. The biggest shock when you start Uni is that the learning technique is nothing like school or even collage.
 
Last edited:
well iv said its java bytecode, wrong answer apparently :s, hence why im asking on here, it also asked:

A one line comment in Java is signified by the characters ____

im 99.999999999% certain the answer is : //

if not that, /*, both incorrect answers apparently ?? im sure its // for the above question
 
done the basics yeah, comments in code iv done are //, and it works, compiles etc, so im not getting why // is the wrong answer, iv written it 'slash slash' the problem is its a 'online test' not a human marker so iv got to put the answer in that the pc database has, is //, slash slash, what ever the answer to 'A one line comment in Java is signified by the characters ____ ' though ? just yes or no would be great as then I know that the database is going wrong or not, as im very sure its //, if its not just say 'no' then ill go off and find the right answer, if it is, just say 'yes' so I dont pull my hair out,lol

edit: iv also written in /* and 'slash star' also wrong answers !! I know a ruddy comment is // or /* , specifically // is a one line comment /* is a 'traditional' comment that needs to be ended */

Am I right or wrong here? yes or no ! lol

If you ask me the online test database is erroring, im so certain im right on this question


EDIT: RIIIGGHTT ok fine the lec just emailed me saying the database is wrong, haha i was right then !
 
Last edited:
well iv said its java bytecode, wrong answer apparently :s, hence why im asking on here, it also asked:

A one line comment in Java is signified by the characters ____

im 99.999999999% certain the answer is : //

if not that, /*, both incorrect answers apparently ?? im sure its // for the above question
Languages that are run on a runtime engine like .net and java are compiled to an intermediate language, of which bytecode is an example.

// are single line comments in java, was this marked by a lecturer or was it automatically marked online or something?
 
If you ask me the online test database is erroring, im so certain im right on this question


EDIT: RIIIGGHTT ok fine the lec just emailed me saying the database is wrong, haha i was right then !


Yup turns out for the 8 questions i tried i got ALL of them right, the database said I was wrong on all, hence me throwing a wobbly and shouting i KNOW im right !! grrrr :D lol
 
Doesn't look good for the lecturer if his database is wrong :p

Maybe he needs to go back to uni and do a few more lessons.
 
Back
Top Bottom