Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
6 votes
1 answer
667 views

Crossword puzzle app

I was hoping someone could give me any tips or advice on this program I wrote for my high school class. The point of the program is to create a workable crossword puzzle in the console. If it works ...
Sean Riley's user avatar
7 votes
6 answers
9k views

Printing a Hollow Butterfly pattern

I am a beginner to Java and have studied up to loops only. After loops lecture above pattern was given to print as homework. I have successfully managed to print this pattern with following code: <...
Strange Alchemist's user avatar
5 votes
3 answers
287 views

Hotel booking with multiple options. Improvement through subclasses?

The code below runs perfectly fine as I want it to. I'd like to create more subclasses to get a better overview over the whole code. Can I place the setter and getter as well as the methods into the ...
Marcel's user avatar
  • 51
1 vote
2 answers
208 views

integer log base 10 function without using java.lang.Math?

I am assigned to a task of creating a function int logBase10Estimate(int n) that returns the log of a number base 10. The answer is integer part only.(w/o using the Math class) Is this okay? ...
zvz's user avatar
  • 23
4 votes
1 answer
204 views

Parsing weather station XML on raspberry pi

This if for a school project that is all about getting the most performance possible out of a relatively weak computer. For this project we have received a weather station report generator that ...
Bobeliciousbob's user avatar
0 votes
1 answer
63 views

Spaceship Operation in for Lexicographic Comparison

I have written a program in Java 8 using BlueJ. There is just one function of type byte that accepts two String values and return 1 if the first word comes before the second in alphabetical order, and ...
Riley Jones's user avatar
3 votes
1 answer
2k views

Salaries exercise

Hey there guys, I have just completed an exercise for uni and I would really like some feedback as I'm pretty new to using java. Areas that I could especially use some input in this instance: ...
user avatar
3 votes
2 answers
141 views

Add three integers and report the sign of the sum

I am in my first high school programming course; the assignment is: Write a program that asks the user to input three integers and outputs a message indicating their sum and whether it is positive,...
Conor Oepkes's user avatar
5 votes
2 answers
2k views

User input happy birthday program

For self-study homework I made a Java program that takes user input, creates people as objects, and says "Happy Birthday" to each person. I am just wondering what mistakes I made here or how it could ...
Steven Halverson's user avatar
4 votes
1 answer
311 views

Drawing consecutive rectangles with an algorithm

I have an assignment to draw rectangles that get larger and larger each time I draw them. Just like shown below. I've labeled them TL = Top Left, TR = Top Right, BL = Bottom Left, BR = Bottom Right. ...
Luke Kelly's user avatar
-1 votes
1 answer
924 views

Compound interest calculator homework [closed]

I am a beginner at coding Java and am having a tough time understanding what is wrong with this code. This is an assignment I had posted about earlier and I also went to a Java tutor at my school for ...
Tori's user avatar
  • 1
2 votes
2 answers
554 views

Integer to Roman Numerals (1 - 2999)

This is a homework assignment. Convert an integer (1 - 2999) to roman numerals. I was wondering if I could make my code more efficient. The way I have it set up is that I take the digits of the input (...
WanderingGiraffe's user avatar
0 votes
1 answer
698 views

Java exercise: String processing and type conversion

The exercise is from a Java-course in which I'm enrolled. The classes Book and APIResponseParser were provided by the instructor. For Book I had to add just a few getter- and setter-methods. For ...
michael.zech's user avatar
  • 4,972
4 votes
2 answers
8k views

Pascal's Triangle - Java Recursion

This is a fully functional implementation of a program to ask the user for a location on Pascal's Triangle, but I kind of cheated by expanding the base case to include row 0 and the 1st and last ...
nathaniel sokolow's user avatar
1 vote
4 answers
121 views

Form a [email protected] address, eliminating diacritics from a name

I'm an amateur programmer who just started learning programming, my school gave me an assignment to create code that reads a surname and lastname from an input dialog box and then to edit those name ...
Semi Turdean Rajhi's user avatar

15 30 50 per page