Questions tagged [drjava]

A lightweight IDE for java, designed primarily for students

DrJava is a lightweight development environment for writing Java programs.

It is designed primarily for students, providing an intuitive interface and the ability to interactively evaluate Java code. It also includes powerful features for more advanced users. DrJava is available for free under the BSD License, and it is under active development by the JavaPLT group at Rice University.

For more information and downloads, visit the official site.

188 questions
2
votes
1 answer

How do I make Random generating objects come on my Screen?

This is my background Image that i have usedI am a New programmer and I am still learning to code. I am tring to create a flappy bird game but my code does not seem to work. What I am tring to do is create code that generates random pipes within my…
Vish
  • 29
  • 4
2
votes
2 answers

multiple classes in Dr. Java

The JDK compiler says it compiles, but when it runs I get this error: Static Error: This class does not have a static void main method accepting String[]. I am used to putting my methods class in one file and putting the main class in a sperate…
Spar Sav
  • 23
  • 6
2
votes
1 answer

How do I use the JDK compiler with Dr Java instead of the Eclipse compiler?

My school forces us to use Dr Java and I'm having trouble getting it to use the JDK compiler instead of the Eclipse compiler.
Marko M
  • 31
  • 3
2
votes
2 answers

what does "must implement the inherited abstract method java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent)" mean?

I hit a roadblock in my code. this is the class in hand. public class StartRoom extends Room implements ActionListener { JButton buttonTwo; public StartRoom() { start(); buttonOne = new JButton("Go to door."); buttonTwo =…
JBoi
  • 47
  • 5
2
votes
4 answers

Java-Storing values in a while loop

I am a beginner in Java and I have an assignment on loops. I know this question may sound very basic to you but I couldn't find an understandable answer. My code basically looks like; import java.util.Scanner; public class Histogram { public…
2
votes
1 answer

I am trying to merge to integer strings but Dr. Java the program I am using won't let me use ArrayUtils?

In this lab, you will be creating a program that merges two arrays of non-negative (equal to or greater than 0) integers. Your program will accept each array as input from the keyboard. You do not know ahead of time how many values will be entered,…
2
votes
1 answer

Printing on the same line in DrJava using System.Out.Print

I am trying to print a grid using DrJava IDE. However my output is displayed in a row, despite the fact that I used System.out.Print() in my inner loop. Why is this happening? public class Percolation { private boolean[][] grid; private int…
Nikhil Prabhu
  • 1,072
  • 3
  • 12
  • 24
2
votes
2 answers

Can't Figure Out How To Do a Try Catch Exception for my Java Program in Dr. Java?

So, I want Java to catch when the inputs something other than what's specified but I can't figure out how to do a proper try catch exception. Sometimes it just skips to the end of the program or in this case, I just get lines of error. If you can…
1
vote
2 answers

Beginner in Java - Controlling output - Generating Asterix

I am having difficulties with completing this program. I am trying to make a program that creates asteriks, but then makes it into a triangle. This is what I have already. public class 12345 { public static void main(String[] args) { int…
LOVEHOPE
  • 11
  • 1
1
vote
1 answer

Using DrJava, how do I shift the characters stored in a 2d array and store in a different location using a Caesar shift cipher

**After collecting a number between 1 and 4 from the user, I need to use a Caesar shift cipher to shift every letter in the array forward by the number the user provided. I decided to use if statements for every possible character that could be in…
1
vote
1 answer

Taking a user input string to form an array

I am trying to create an array that uses a user input string to form the base for the array. It's supposed to be an encryption program that takes the string the user enters and puts it in an array at the index 0, all the way down the column. For…
Sin950
  • 21
  • 4
1
vote
0 answers

ics array simulate dice rolls

Write a program that will simulate the roll of 3 dice, and keep track of the total of each roll. The program will ask the user for the number of rolls, then it will make that many rolls, and your program will keep track of the frequency of each…
1
vote
1 answer

Dr. Java System.out.println shortcut

I am currently in a situation where I am using Dr. Java, and I can not find a sysout style shortcut for the System.out.println. Is there an equivalent?
1
vote
3 answers

How to resolve "unable to find package java.lang in classpath or bootclasspath" in Dr Java?

I am new to Java. I am taking a University beginners Java course. I'm running my first hello world code and am getting an error message. I have installed the latest Dr. Java stable version and have installed Java SE 12 JDK. I have uninstalled and…
Erica Garza
  • 5
  • 1
  • 1
  • 4
1
vote
1 answer

How do I create an application that prompts the user for an integer and returns the number of digits it has?

I've started writing this code down, and I want to find the return of the number digits it has after the user prompts for the an integer. Where do I begin with this solution? I'm still currently new to Dr Java coding. However, I've tried researching…
user11338036
1
2
3
12 13