user162097
6
Q:

hello world program i n java

public static void main(String[] args){
  System.out.println("Hello World");
}
16
public class HelloWorld { 
   public static void main(String []args) {
      /* println() function to write Hello, World! */
      System.out.println("Hello, World!");     
   }
}
3
class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}
4
// This is just a line of code, but publilc class.... is needed!
        System.out.println("This will be printed");
1
// Your First Program

class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!"); 
    }
}
0
Sprite.prototype.myMove = function (){
	var elem = document.getElementById("avion1");   
	var pos = 0;
	var id = setInterval(frame, 10);
	function frame() {
	  if (pos == 550) {
		clearInterval(id);
	  } else {
		pos++; 
		elem.style.top = pos + 'px'; 
	  }
	}
  }
//using requestAnimationFrame
var start;
var stopId;
var progress;
var toggle = false;

var element = document.getElementById('avion1');

function step(timestamp) {
  if (!start || progress > 400) start = timestamp;
  progress = (timestamp - start) / 10 + 50;
  element.style.top = progress + 'px';
  stopId = window.requestAnimationFrame(step);
}

function toggleAnimation() {
  if (!toggle) {
    toggle = true;
    window.requestAnimationFrame(step);
  } else {
    toggle = false;
    cancelAnimationFrame(stopId);
  }
}
-1

New to Communities?

Join the community