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
0
votes
2 answers

How to get rid of duplicate local variable input

Everything else is working in both programs but every time I try to compile and run it gives me this error Duplicate local variable input and I can not seem to fix it. I've looked up solutions none seem to work. **Scanner scan = new…
k wets
  • 1
  • 1
0
votes
1 answer

"retailPrice" cannot be resolved to a variable

I keep getting the error message "retailPrice cannot be resolved to a variable". I am getting it on several other lines as well but let's just start here. import java.text.DecimalFormat; class Billing { public static void main(String[]…
0
votes
2 answers

how to iterate through this 2D array. It works for a 4x4 but nothing beyond that

I am not able to correctly fill a 5X5 array and successfully print the array. Both are methods. a 4X4 works fine. I have tried re writing the code in different ways but no success // assume I have defined everything else private int[][] board =…
0
votes
2 answers

Having Issues With Arguments and Parameters In Methods

I'm having difficulty with this certain bit of code in my most recent assignment. This assignment displays prices to the user for gas, asks what type they would like and how many gallons. The program returns the total price as a double. I've created…
Jusinr518
  • 33
  • 5
0
votes
1 answer

Why is it saying that my public class is not defined when I only have one public class and the class file

import java.util.Scanner; public class Lab6_2{ public static void main(String[] args){ Scanner sc_1 = new Scanner(System.in); int numnber, i; System.out.println("Enter an integer between 1 and 10."); number = sc_1.nextInt(); } } This code…
0
votes
1 answer

Easiest way to convert all USD calculations to EURO ? (java)

I am creating an ATM code that calculates how much denominations of USD/EURO (20s,10s,5s,1s, cents) will be withdrawn based on user input amount. I have already completed the USD calculations.. but now I have to convert all of this to EURO (*1.13…
Knightly
  • 27
  • 6
0
votes
0 answers

How to "fix [line:(no source Location)]" when I transfer my code from eclipse to dr.java?

When I try to transfer my eclipse source code to dr.java, the first line "package TrigonometricCalculators;" doesn't work. The compiler gives me "File: C:\Users\TwlEm\Desktop\TrigCalculators.java [line: (no source location)] Error: File is in…
0
votes
0 answers

Java. Using drjava compiler gives me an error than no other compiler gives me

import java.io.*; import java.util.*; public class GentCanadian { public static void main (String[] args) throws IOException { BufferedReader objReader = new BufferedReader (new InputStreamReader (System.in)); String lowerInput = "";…
0
votes
1 answer

Sorting array of letter frequency

I am writing a program that counts the letter frequency of a file to eventually use to help decode a different file. I am able to correctly sort the array by values (the method call i commented out) but am unable to figure out how to sort the…
Nicholas
  • 89
  • 6
0
votes
1 answer

I can't find the exact error in my code “The filename, directory name, or volume label syntax is incorrect”

Please find what am i missing here the output: https://drive.google.com/open?id=1Ur6XOHWJAoJ7aVLRqNP8E39j3Hz9E2T8 try { FileReader fr = new FileReader ("residenceData.txt"); BufferedReader br = new BufferedReader (fr); BufferedWriter bw1 =…
Ress
  • 1
  • 1
0
votes
1 answer

Rolling dice program

new to programming here. I am working on dice simulator project that is almost finished but I am having trouble adding a histogram that prints an asterisk equivalent to the frequency. I believe i need to use nested for loops but am getting very…
Nicholas
  • 89
  • 6
0
votes
1 answer

Pass arguments to program in Eclipse QUICKLY

I'm learning Java and I've been trying to get used to Eclipse. It's slick and I like it, but it is annoying to change input arguments for the programs I'm writing. I know I have to go to "Run configurations" etc and enter the arguments under the…
P. Gillich
  • 289
  • 1
  • 9
0
votes
2 answers

Squaring application in java

New to programming here. I need to write application that does the following... Squaring application instructions The code I have so far follows. I am running into a problem where my code will not read from negative integers to strings and properly…
Nicholas
  • 89
  • 6
0
votes
1 answer

Running selenium test with DrJava IDE

It is possible to run the selenium libraries on DrJava, if so how can I make the test case to run the respective libraries. I'm tying to run some test cases in Junit
0
votes
2 answers

how to make a method print out the amount of times a specific number was rolled?

i have to make a dice program. the program asks how many times you want to roll the dice, and then it asks what number you want the statistics for (2-12). it then rolls the dice (x) amount of times and gives you the number rolled each time. then…
bugjuice
  • 31
  • 7