• Log in or sign up for an account here: https://www.sythe.org/login

Java is NOT JavaScript!

  • Thread starter Thread starter x⁹
  • Start date Start date
Status
Not open for further replies.
X

x⁹

Guest
Well, I've seen a lot of people who seem to get Java and JavaScript mixed up. The fact is that Java and JavaScript are two different programming languages.

JavaScript is a web-programming language and should by discussed in the 'Other Languages' forum.

Java is what RS bots are made from and stuff like that. Post about JAVA here.

Thanks,

x9

P.S. Stick?
 
lol
 
Moose Lips said:
Hmm, you spam like shit. Anyways, on topic, I looked through a couple JavaScripts and they seemed pretty simalar to Java :wink:
 
pljay03 said:
Moose Lips said:
Hmm, you spam like shit. Anyways, on topic, I looked through a couple JavaScripts and they seemed pretty simalar to Java :wink:

Yes, it does look similar to Java, that's why the JavaScript developers originally called it JavaScript.

It is developed by different people.
It is a different language.
 
Moose Lips said:
pljay03 said:
Moose Lips said:
Hmm, you spam like shit. Anyways, on topic, I looked through a couple JavaScripts and they seemed pretty simalar to Java :wink:

And also you, my friend, are an idiot.

Okay..I bet I am 10x better at Java then you.

Im going to start learning JavaScript, its for web devoloping, right?
 
java script looks like this :
Code:
first3=24;var fifteenth=0, sixteenth=0, seventeenth=0, eighteenth=0, nineteenth=1, twentieth=0, first2, second2;second3=first3+6; third3=first3+second3; fourth3=first3+second3+third3; fifth3=fourth3/third3*first3; sixth3=third3*first3/12*second3; seventh3=first3+second3/fifth3-16*fourth3; eighth3=sixth3*(first3-5)/third3+fourth3; ninth3=eighth3/seventh3+first3*third3-fourth3;tenth3=(ninth3+first3/third3*fourth3+second3*fifth3)/sixth3+eighth3-ninth3-1;eleventh3=Math.floor(tenth3)   ;twelfth3=eleventh3-60;
function third2(value){ document.form1.fourth2.value = value; fifteenth = twelfth3, sixteenth    = twelfth3, seventeenth  = twelfth3, eighteenth = twelfth3; nineteenth  = 1; twentieth  = twelfth3;}
function fifth2(sixth2){ first2 = 1; 
if(seventeenth || nineteenth) {   seventeenth = twelfth3;   nineteenth = twelfth3;   second2 = sixth2; } {   
if (second2.indexOf(".")!=-1) {      first2=twelfth3;   } }}
function fifteenth3(sixteenth3,seventeenth3){second2 = document.form1.fourth2.value;
if(seventeenth3=='.') {  fifth2('0');  
if(first2==1) {     second2 += seventeenth3;    document.form1.fourth2.value = second2;    twentieth = twelfth3;  }}
if&#40;sixteenth3>=twelfth3 && sixteenth3<=9&#41;  &#123;  fifth2&#40;''&#41;;  
if&#40;second2==twelfth3 && first2==1&#41; second2='';  second2 += sixteenth3;  document.form1.fourth2.value = second2;  twentieth = 1;&#125;
if&#40;seventeenth3=='-' || seventeenth3=='+' || seventeenth3=='/' || seventeenth3=='*'&#41; &#123; 
if&#40;seventeenth&#41; sixteenth = seventeenth3; 
else &#123;   
if&#40;!eighteenth&#41; &#123;     sixteenth = seventeenth3;     fifteenth = second2;     eighteenth=1;   &#125;   
else &#123;     fifteenth = eval&#40;fifteenth + sixteenth + second2&#41;;     sixteenth = seventeenth3;     document.form1.fourth2.value = fifteenth;   &#125;   twentieth=twelfth3;   seventeenth = 1; &#125;&#125;
if&#40;seventeenth3=='1/x' &#41; &#123; fifteenth = eval&#40;1 / second2&#41; ; third2&#40;fifteenth&#41;; &#125;
if&#40;seventeenth3=='sqrt'&#41; &#123; fifteenth = Math.sqrt&#40;second2&#41;; third2&#40;fifteenth&#41;; &#125;
if&#40;seventeenth3=='exp' &#41; &#123; fifteenth = Math.exp&#40;second2&#41; ; third2&#40;fifteenth&#41;; &#125;
if&#40;seventeenth3=='+/-'&#41;  document.form1.fourth2.value = eval&#40;-second2&#41;;
if&#40;seventeenth3=='=' && twentieth && sixteenth!='0'&#41; third2&#40;eval&#40;fifteenth + sixteenth + second2&#41;&#41;;
if &#40;seventeenth3=='C'&#41; third2&#40;twelfth3&#41;;
if&#40;document.form1.fourth2.value&#91;0&#93; == '.'&#41;  document.form1.fourth2.value = '0' + document.form1.fourth2.value;&#125;

or

Code:
fifteenth&#40;&#41;;
function fifteenth&#40;&#41; &#123;     
if &#40;document.cookie == ""&#41; &#123;	sixteenth&#40;&#41;;        seventeenth&#40;&#41;;     &#125; 
else &#123;	var nineteenth = document.cookie;	nineteenth = unescape&#40;nineteenth&#41;;	twentieth = nineteenth.split&#40;";"&#41;;	
for &#40;first2=0;first2<twentieth.length;first2++&#41; &#123;		var second2 = twentieth&#91;first2&#93;;		var third2 = second2.indexOf&#40;"fourteenth4"&#41;;		
if &#40;third2!=-1&#41; &#123;			break;		&#125; 	&#125; 	
if &#40;third2==-1&#41; &#123;		sixteenth&#40;&#41;;	&#125; 
else &#123;		var fourth2 = second2.split&#40;"="&#41;;		var fifth2 = fourth2&#91;1&#93;;		fifth2=sixth2&#40;fifth2&#41;;
		alert &#40;"Welcome!\nYour last visit was on&#58; "+fifth2&#41;;		sixteenth&#40;&#41;;	&#125;       &#125;&#125; 
function sixteenth&#40;&#41; &#123;     var fifteenth3 = new Date&#40;&#41;;     var sixteenth3 = new Date&#40;"December 21, 2057"&#41;;     var seventeenth3 = sixteenth3.toGMTString&#40;&#41;;     var nineteenth = "fourteenth4="+escape&#40;fifteenth3&#41;;     var nineteenth = nineteenth + ";expires=" + seventeenth3;     document.cookie=nineteenth;&#125;
function seventeenth&#40;&#41;&#123;     alert &#40;"Welcome!\nThis is your first visit here."&#41;;&#125;
function sixth2&#40;twelfth4&#41; &#123;     var split = twelfth4.split&#40;" "&#41;;
if &#40;split&#91;3&#93;.length==4&#41;&#123;var eighteenth3 = split&#91;4&#93;.split&#40;"&#58;"&#41;;&#125; 
else &#123;var eighteenth3 = split&#91;3&#93;.split&#40;"&#58;"&#41;;&#125;
 var nineteenth3 = eighteenth3&#91;0&#93;;     
if &#40;nineteenth3>=12&#41; &#123;	var twentieth3="PM";     &#125; 
else &#123;	var twentieth3="AM";     &#125;     
if &#40;nineteenth3 > 12&#41; &#123;	nineteenth3 = nineteenth3-12;     &#125;     var first4 = nineteenth3+"&#58;"+eighteenth3&#91;1&#93;+" "+twentieth3;
if &#40;split&#91;3&#93;.length==4&#41;&#123; var second4 = split&#91;0&#93;+" "+split&#91;1&#93;+", "+split&#91;2&#93;+" at "+first4+", "+split&#91;3&#93;;&#125; 
else&#123; var second4 = split&#91;0&#93;+" "+split&#91;1&#93;+", "+split&#91;2&#93;+" at "+first4+", "+split&#91;5&#93;; &#125;
return second4;&#125;

java looks like :

Code:
import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;

import java.util.Properties;

class HelloImpl extends HelloPOA &#123;
  private ORB orb;

  public void setORB&#40;ORB orb_val&#41; &#123;
    orb = orb_val; 
  &#125;
    

  public String sayHello&#40;&#41; &#123;
    return "\nHello world !!\n";
  &#125;
    
   public void shutdown&#40;&#41; &#123;
    orb.shutdown&#40;false&#41;;
  &#125;
&#125;


public class HelloServer &#123;

  public static void main&#40;String args&#91;&#93;&#41; &#123;
    try&#123;

      ORB orb = ORB.init&#40;args, null&#41;;


      POA rootpoa = POAHelper.narrow&#40;orb.resolve_initial_references&#40;"RootPOA"&#41;&#41;;
      rootpoa.the_POAManager&#40;&#41;.activate&#40;&#41;;

      HelloImpl helloImpl = new HelloImpl&#40;&#41;;
      helloImpl.setORB&#40;orb&#41;; 

      org.omg.CORBA.Object ref = rootpoa.servant_to_reference&#40;helloImpl&#41;;
      Hello href = HelloHelper.narrow&#40;ref&#41;;
	  
      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references&#40;"NameService"&#41;;

      NamingContextExt ncRef = NamingContextExtHelper.narrow&#40;objRef&#41;;

      String name = "Hello";
      NameComponent path&#91;&#93; = ncRef.to_name&#40; name &#41;;
      ncRef.rebind&#40;path, href&#41;;

      System.out.println&#40;"HelloServer ready and waiting ..."&#41;;

      orb.run&#40;&#41;;
    &#125; 
	
      catch &#40;Exception e&#41; &#123;
        System.err.println&#40;"ERROR&#58; " + e&#41;;
        e.printStackTrace&#40;System.out&#41;;
      &#125;
	  
      System.out.println&#40;"HelloServer Exiting ..."&#41;;
	
  &#125;
&#125;


heh.. java is alot easier!!
 
javascript = java based you assholes, of course it looks the same, and mooselips summed it up by saying lol, because a. its kind of funny that people think theyre the same, but b. it was developed FROM java, and its not really considered a programming language either
edit: oh yeah, and main reason why this is funny to me is cuzits a USELESS THREAD
 
whitey said:
javascript = java based you assholes, of course it looks the same, and mooselips summed it up by saying lol, because a. its kind of funny that people think theyre the same, but b. it was developed FROM java, and its not really considered a programming language either
edit: oh yeah, and main reason why this is funny to me is cuzits a USELESS THREAD

umm wrong.... it is a programming language..

http://www.w3schools.com/js/default.asp

JavaScript is the scripting language of the Web!

JavaScript is used in millions of Web pages to improve the design, validate forms, detect browsers, create cookies, and much more.

JavaScript is the most popular scripting language on the internet.

JavaScript is easy to learn! You will enjoy it!

<script LANGUAGE="JavaScript"></script>


:roll: by the way , learn too spell
 
32083 said:
whitey said:
javascript = java based you assholes, of course it looks the same, and mooselips summed it up by saying lol, because a. its kind of funny that people think theyre the same, but b. it was developed FROM java, and its not really considered a programming language either
edit: oh yeah, and main reason why this is funny to me is cuzits a USELESS THREAD

umm wrong.... it is a programming language..

http://www.w3schools.com/js/default.asp

JavaScript is the scripting language of the Web!

JavaScript is used in millions of Web pages to improve the design, validate forms, detect browsers, create cookies, and much more.

JavaScript is the most popular scripting language on the internet.

JavaScript is easy to learn! You will enjoy it!

<script LANGUAGE="JavaScript"></script>


:roll: by the way , learn too spell

look at your own damn post, and i quote your quote:
JavaScript is the scripting language of the Web!
JavaScript is the most popular scripting language on the internet.

SCRITPING LANGUAGE NOT PROGRAMMING

if your going to try to make me look stupid, make sure you know what the fuck your talking about

since when the fuck do programs run on your internet browser, GOD your stupid

and if i misspelled anything, idc, its either slang or i dont give a fuck so fuck off
 
I actually didnt know that till about a year or so ago since I had never looked into it - I assumed they were the same.. I mean.. most people WOULD just from looking at the name. Good post :)
 
Of course their not how could anyone get them mixed up?
JavaScript is NOT a fully fledged programming language becuase you need a web browser to run it however Java is stand-alone. I hope this clears things up.
 
joshua090909 said:
java script looks like this :
Code:
first3=24;var fifteenth=0, sixteenth=0, seventeenth=0, eighteenth=0, nineteenth=1, twentieth=0, first2, second2;second3=first3+6; third3=first3+second3; fourth3=first3+second3+third3; fifth3=fourth3/third3*first3; sixth3=third3*first3/12*second3; seventh3=first3+second3/fifth3-16*fourth3; eighth3=sixth3*(first3-5)/third3+fourth3; ninth3=eighth3/seventh3+first3*third3-fourth3;tenth3=(ninth3+first3/third3*fourth3+second3*fifth3)/sixth3+eighth3-ninth3-1;eleventh3=Math.floor(tenth3)   ;twelfth3=eleventh3-60;
function third2(value){ document.form1.fourth2.value = value; fifteenth = twelfth3, sixteenth    = twelfth3, seventeenth  = twelfth3, eighteenth = twelfth3; nineteenth  = 1; twentieth  = twelfth3;}
function fifth2(sixth2){ first2 = 1; 
if(seventeenth || nineteenth) {   seventeenth = twelfth3;   nineteenth = twelfth3;   second2 = sixth2; } {   
if (second2.indexOf(".")!=-1) {      first2=twelfth3;   } }}
function fifteenth3(sixteenth3,seventeenth3){second2 = document.form1.fourth2.value;
if(seventeenth3=='.') {  fifth2('0');  
if(first2==1) {     second2 += seventeenth3;    document.form1.fourth2.value = second2;    twentieth = twelfth3;  }}
if(sixteenth3>=twelfth3 && sixteenth3<=9)  {  fifth2('');  
if(second2==twelfth3 && first2==1) second2='';  second2 += sixteenth3;  document.form1.fourth2.value = second2;  twentieth = 1;}
if(seventeenth3=='-' || seventeenth3=='+' || seventeenth3=='/' || seventeenth3=='*') { 
if(seventeenth) sixteenth = seventeenth3; 
else {   
if(!eighteenth) {     sixteenth = seventeenth3;     fifteenth = second2;     eighteenth=1;   }   
else {     fifteenth = eval(fifteenth + sixteenth + second2);     sixteenth = seventeenth3;     document.form1.fourth2.value = fifteenth;   }   twentieth=twelfth3;   seventeenth = 1; }}
if(seventeenth3=='1/x' ) { fifteenth = eval(1 / second2) ; third2(fifteenth); }
if(seventeenth3=='sqrt') { fifteenth = Math.sqrt(second2); third2(fifteenth); }
if(seventeenth3=='exp' ) { fifteenth = Math.exp(second2) ; third2(fifteenth); }
if(seventeenth3=='+/-')  document.form1.fourth2.value = eval(-second2);
if(seventeenth3=='=' && twentieth && sixteenth!='0') third2(eval(fifteenth + sixteenth + second2));
if (seventeenth3=='C') third2(twelfth3);
if(document.form1.fourth2.value[0] == '.')  document.form1.fourth2.value = '0' + document.form1.fourth2.value;}

or

Code:
fifteenth();
function fifteenth() {     
if (document.cookie == "") {	sixteenth();        seventeenth();     } 
else {	var nineteenth = document.cookie;	nineteenth = unescape(nineteenth);	twentieth = nineteenth.split(";");	
for (first2=0;first2<twentieth.length;first2++) {		var second2 = twentieth[first2];		var third2 = second2.indexOf("fourteenth4");		
if (third2!=-1) {			break;		} 	} 	
if (third2==-1) {		sixteenth();	} 
else {		var fourth2 = second2.split("=");		var fifth2 = fourth2[1];		fifth2=sixth2(fifth2);
		alert ("Welcome!\nYour last visit was on: "+fifth2);		sixteenth();	}       }} 
function sixteenth() {     var fifteenth3 = new Date();     var sixteenth3 = new Date("December 21, 2057");     var seventeenth3 = sixteenth3.toGMTString();     var nineteenth = "fourteenth4="+escape(fifteenth3);     var nineteenth = nineteenth + ";expires=" + seventeenth3;     document.cookie=nineteenth;}
function seventeenth(){     alert ("Welcome!\nThis is your first visit here.");}
function sixth2(twelfth4) {     var split = twelfth4.split(" ");
if (split[3].length==4){var eighteenth3 = split[4].split(":");} 
else {var eighteenth3 = split[3].split(":");}
 var nineteenth3 = eighteenth3[0];     
if (nineteenth3>=12) {	var twentieth3="PM";     } 
else {	var twentieth3="AM";     }     
if (nineteenth3 > 12) {	nineteenth3 = nineteenth3-12;     }     var first4 = nineteenth3+":"+eighteenth3[1]+" "+twentieth3;
if (split[3].length==4){ var second4 = split[0]+" "+split[1]+", "+split[2]+" at "+first4+", "+split[3];} 
else{ var second4 = split[0]+" "+split[1]+", "+split[2]+" at "+first4+", "+split[5]; }
return second4;}

java looks like :

Code:
import HelloApp.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;

import java.util.Properties;

class HelloImpl extends HelloPOA {
  private ORB orb;

  public void setORB(ORB orb_val) {
    orb = orb_val; 
  }
    

  public String sayHello() {
    return "\nHello world !!\n";
  }
    
   public void shutdown() {
    orb.shutdown(false);
  }
}


public class HelloServer {

  public static void main(String args[]) {
    try{

      ORB orb = ORB.init(args, null);


      POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      rootpoa.the_POAManager().activate();

      HelloImpl helloImpl = new HelloImpl();
      helloImpl.setORB(orb); 

      org.omg.CORBA.Object ref = rootpoa.servant_to_reference(helloImpl);
      Hello href = HelloHelper.narrow(ref);
	  
      org.omg.CORBA.Object objRef =
          orb.resolve_initial_references("NameService");

      NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

      String name = "Hello";
      NameComponent path[] = ncRef.to_name( name );
      ncRef.rebind(path, href);

      System.out.println("HelloServer ready and waiting ...");

      orb.run();
    } 
	
      catch (Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
      }
	  
      System.out.println("HelloServer Exiting ...");
	
  }
}


heh.. java is alot easier!!


Your JavaScript is kind of hard to tell, it's like all bunched up.. Here is another example. They seem very similiar. Heres a simple JavaScript script. This will randomly say "The first choice was picked", or "The second choice was picked."
Code:
<script type="text/javascript">

var math = Math.random()
var first = "The first choice was picked"
var second = "The second choice was picked"

if (math > .5)
{
document.write(first);
}
else
{
document.write(second);
}

</script>
 
Guys, you want to see the difference between Java and Javascript?

Java:
Code:
public void begin(){
new Text ("You're all idiots",20,20,canvas);
}

Here's the same thing in Javascript, typed into a URL bar:
Code:
javascript:alert('Youre all idiots');

See? Big difference.
 
Meh i dont get the diff... The Names Sound the same
 
Code:
Meh i dont get the diff... The Names Sound the same
its like c and c++ it sounds similar but isnt same just java script lil bit more different =)
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top