How to get this in java ?

Answer Here's your code:import java.util.Scanner; // for user inputpublic class Diamond { public static void main(String[] args) { Scanner scan = new Scanner(; System.out.print("Enter size of ... Read More »

Top Q&A For: How to get this in java

What does this do in java?

You mean this line?public payback () {That's called the constructor. Obviously, you asked this question, which is based on OOP, and yet doesn't know what is it or what it do. The constructor is a m... Read More »

How to change this java program?

First, let's clear something up first. You declared all variables double, but you use an integer input stream "keyboard.nextInt()". Even though it compiles fine, it's not good programming skills to... Read More »

How to print a number like this [1] in java?

static void printNumbers(int maximum) {for (int i=1; i

Who can help me with this Java Question?

Honestly, you're just asking someone to write out your homework for you. It's quite a long piece of work, I assume it's homework, you should be doing this yourself!However, I will give you a few li... Read More »