Java | JSP | JSF Answers

Questions: 3 611

Answers by our Experts: 3 611

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

What is the output of the following Java program?

import java.util.*;

class ArrayGames {

public static void main(String[] args) {

int[] a = {1,2,3,4,5};

System.out.println(a[1]);

}

}


What is the output of the following Java program?

import java.util.*;

class ArrayGames {

public static void main(String[] args) {

int[] a = {1,2,3,4,5};

System.out.println(a[1]);

}

}


Create a simple text-based console game that implements at least three (3) interfaces. Below is the initial part of a sample program.

Enter your name: Nika

Press 1 or 2 to select your game mode.

1- Story

2 - Survival

Press P to start playing, Nika.


Implement the following equation

 

          3x4sin(180x) + 4x3cos(90x) + x2sin(tan(45)) + 7x + 9cos(90x2 )

 

Where x may be user defined value.

Java Language


University has restricting those students having odd roll numbers in the campus on Monday, Wednesday, and friday and for those students having even roll number on Tuesday, Thursday and saturday. Demonstrate the scenario by completing the following code snippet that will inform to the students on which day he/she can come to the campus


Write a program to store 15 numbers in an array. Then display all two digits number in ascending order and also display how many such numbers found.

Hint: Use sorting.


An ecommerce company plans t



give their customers a special



discount for the Christmes They are



planning to offer a faccount. The



discount value is called as the



of all the prime chgits in the

ADD CODE: MOVE ZOMBIE W/ ARROW KEYS CONTINUOUSLY. EX: IF IT IS UP, IT MUST CONTINUE UP EVEN W/ 1 CLICK UNLESS YOU CLICK ANOTHER ARROW KEY.


public class j extends java.applet.Applet implements Runnable {


Image z[] = new Image [2];


Image crImg;


Thread r;


int x;


int y;


public void init() {


String zSrc[] = {"z1.png", "z2.png",};


for (int i = 0; i < zombies.length; i++) {


z[i] = getImage(getCodeBase(), "images/" + zSrc[i]); }}


public void start() {


if (r == null) {


r = new Thread(this);


r.start();}}


public void stop() {


if (r != null) {


r.stop();


r = null;}


void pause (int time) {


try { Thread.sleep(time); }


catch (InterruptedException e) { }}


public void run() {


walk (0, size().width); }


void walk (int start, int end) {


for (int i = start; i < end; i += 1) {


x = i;


if (crImg == zombies[0])


crImg = zombies[1];


else crImg = zombies[0];


repaint();


pause(150);}


public void paint(Graphics g) {


if (crImg != null)


g.drawImage(crImg, x, y, width, height, this);}



Create a simple text-based console game that implements at least three (3) interfaces. Below is a initial part of a sample program.


Enter your name: Nika

Press 1 or 2 to select your game mode.

1 - Story

2 - Survival

Press P to start playing, Nika.


Pleae visit link below, its question 8, i want the answer without using import.java http://ntci.on.ca/compsci/java/ch6/6_10.html

Please use Java


Ill highly appreciate your free help, my friend recommended this to me.


LATEST TUTORIALS
APPROVED BY CLIENTS