Presentation is loading. Please wait.

Presentation is loading. Please wait.

Differences between Java and JavaScript

Similar presentations


Presentation on theme: "Differences between Java and JavaScript"— Presentation transcript:

1 Differences between Java and JavaScript
Programming languages PART 3: repeating and math

2 Math in Java Essentially the same Int vs double If there’s no decimal in the problem, there’s no decimal in the answer. Chop off (truncate any decimal part) Order of Operations             Same as math (1+2) * – 4 / Please Excuse My Dear Aunt Sally. + add - subtract * multiply / divide % remainder after division

3 Modularization Javascript uses functions Java uses methods
function myFunction ( ) { statements; } Java uses methods public void myFunction ( ) { statements; }

4 OOP Syntax (Object Oriented Programming)
What is OOP? Java Defining objects: their properties and actions The syntax to invoke a method for an object is: objectName.method(parameters) Create an object: Circle c = new Circle(10); Call a method c.setColor(Color.red); You can define your own classes and methods.


Download ppt "Differences between Java and JavaScript"

Similar presentations


Ads by Google