Questions tagged [bluej]

BlueJ is a popular Java IDE aimed at teaching the principles of object oriented programming.

BlueJ is an open source platform written in Java that's especially aimed at beginner developers. It presents items to the user in a much more easy and intuitive format than more comprehensive IDEs such as Netbeans or Eclipse, helping people get started quickly and easily whilst also understanding what's going on.

Download

The latest version of BlueJ is available from the download page, here.

Useful Links

1093 questions
-4
votes
1 answer

Prompting user for password and then checking it in Java

Using the code from the second and third videos, change them to prompt the user for information. On the password video (2nd one), once you write the code to prompt the user for a 4 character password, see if you can also print a “Wrong, try again”…
-4
votes
1 answer

Adding a list of strings to an array - new Java user

I have this following code; import java.util.ArrayList; public class Sequence { // the numbers in the sequence private ArrayList list; //defining an array called list String dwade; public Sequence(String s) { …
-4
votes
3 answers

Can you add an array list to a variable in java

I have the following code: public static void main (String args[]) { Scanner input = new Scanner(System.in); System.out.println("\nLab1a\n"); final int MAX = 100; boolean primes[]; primes = new boolean[MAX]; …
Bob
  • 23
  • 1
  • 9
-4
votes
3 answers

Pattern in java using numbers

I am trying to print the following pattern but don't get the logic how to.. Can you please help me out.. I am using BlueJ and this is my first question so I am not sure what is required. 1 2 2 3 3 3 3 …
Anirudh
  • 9
  • 1
  • 1
  • 7
-4
votes
2 answers

can not find symbol (numOfAccounts)

public class AccountDemo { public static void main(String [] args) { Account accountholder1, accountholder2, accountholder3; accountholder1 = new Account(100, 10, 1000, "", ""); accountholder1.showData(); …
Aneeqa
  • 1
  • 1
-4
votes
1 answer

Bank Interest using a for loop

Part B: For Loop Program Write a program to compute the interest on a bank account. The program will have the following characteristics: The user will be prompted to input a single line of text containing the deposit amount ($), interest rate…
Beginner
  • 1
  • 1
  • 1
-4
votes
1 answer

Boolean line error

So basically, I had to write a little java programm that assigns student scores. It works fine, I can enter H (Higher) grades fine, but when I choose S(standart) it throws me back to the editor and I just don't udnerstand whats wrong. boolean…
-4
votes
2 answers

Method can not be referenced from a static context

I'm getting this error: non-method setBounds(int,int,int,int) cannot be referenced from a static context My code is below: import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JButton; import javax.swing.JTextField; import…
-4
votes
4 answers

How to create a map instance variable

I've been trying to create a class that will model a scenario I've come up with. It will involve a map with string keys and values. I need to create an instance variable used to reference the map object, and a constructor that creates the empty map…
Harry Jones
  • 51
  • 2
  • 2
  • 6
-4
votes
2 answers

Syntax error in calling a method java (newbie)

The 2 answers posted both fixed it. thank you very much and i am embarrassed by how simple it was. sorry for posting such a basic question and thank you for your time. From the menu method at the top i wish to call 2 different methods to complete…
-5
votes
1 answer

My code keeps on showing 'array required but java.lang.String found' when I try to compile it

I was trying to build a TIC-TAC-TOE GAME.For that I used a 2-D String array. I declared it as global. I had to update the subscripts at some point of time. But something went wrong and I don't know what. Can someone tell me what went wrong. …
-5
votes
3 answers

have no idea why java.lang.NoSuchMethodException happens

I keep having this error and have no idea why and here is my code below. public class Movie{ private String title; private int year; private int price; private Genre genre; public Movie(String title, int year, int price, Genre genre) { …
Jamen
  • 169
  • 8
-5
votes
1 answer

SohCahToa Project

I need some help with a project I'm working on the side to help me in my physics and chemistry class. This is the code that I have produced so far and it seems to give me an answer that are incorrect for all trials I have given it. All help is…
-5
votes
2 answers

Generate Random Number Method in Interface Class

I have an interface class and in this class I need to create an abstract method that generates a random int. However, when I try to compile I get an error because abstract classes cannot have bodies. How can I create an abstract method that…
Nuki
  • 3
  • 3
-5
votes
3 answers

Make java give the the highest sum of 3 numbers out of 4 given

When given 4 numbers, how do i find which 3 numbers out of the 4 will give the greatest sum. So if given 3 2 5 5, i want java to sum 3 5 5 for a total of 13 I have been searching for about 20 minutes and all i find is how the find the highest number…
Tyler R
  • 3
  • 2
1 2 3
72
73