Tagged Questions
Java (not to be confused with JavaScript) is a class-based, object-oriented, strongly typed, reflective language and runtime environment (JRE). Java programs are compiled to bytecode and run in a virtual machine (JVM) enabling a "write once, run anywhere" (WORA) methodology.
0
votes
0answers
3 views
how to launch jython with java class with arguments
I couldn't think off a better title to describe this, but here is the situation:
I have a java software, named hipe, in which a jython console is provided.
Now, I want to import modules of hipe from ...
0
votes
0answers
20 views
I need to create layout according to this picture
I need to create layout according to this picture.
I tried everything , linearlayout one inside other, relative layout etc.
Every time something is wrong, sometimes layout overlaps each other ...
0
votes
3answers
35 views
Why does this boolean expression not work flipped?
This is what I wrote for a coding bat project thing. For some reason it says that this way it doesn't work but if I flip it, it works. Why is that? When it inputs something with less than 3 chars it ...
0
votes
1answer
25 views
Java Socket… how it works?
I have a question on Java sockets.
I'm trying to build a basic server-client connection in java using the net package classes. so to start with, I'm used the Socket class and created a socket ...
2
votes
3answers
41 views
OOP Design Quesiton with a Card Game
I am becoming a bit more confident with my programming skills, so I've decided to restart a card game I'd previously began. The point of this program is now that I have a decent grasp of program flow, ...
0
votes
2answers
52 views
How to get the name of a property as string?
I have a class Car that has a property trunk. How can I retrieve the name (not the value) of that property as String and refactorable.
Something working like this fiction would be great:
...
0
votes
0answers
4 views
Unit testing CDI with CDI-Unit Jglue
we want to use Jglue framework for unit testing our CDI application. We use gradle for building.
We have prepared something like this:
1) Class to test:
@Default
public class ...
0
votes
1answer
20 views
cast priorityQueue to my customized interface
public class testCast {
public interface dataQueue extends Queue<Object>{};
public static void main (String test[]){
dataQueue queue = (dataQueue) new ...
0
votes
4answers
21 views
Java Strings empty string handling
I have a Java code that should print nothing if no-element string is passed.Currently,my method is passing all tests but the one with no-element string.It gives me error.Code is below.Any suggestions ...
0
votes
3answers
38 views
Sorting an arraylist
I am looking to sort my array by the name of a company, printing only the companies that are open before a specific time...... before printing
public void printCompanies(int time)
{
Iterator ...
0
votes
0answers
19 views
Java Variable Class Passing from JFrame
I am very new to Java and have been learning as I go since this is how my job requires it. I am building a GUI to have the user imput infomration into on JFrame then I need to save what they entered ...
0
votes
1answer
11 views
How to delete a drawn string in JFrame
So basically I want to have a number system on a JFrame panel. The number is displayed on the frame using this method.
public static void text(int x, int y, String text)
{
if (instance == null)
...
0
votes
0answers
39 views
(Java Eclipse) Rental System
I'm new here and this is going to be my first question. I am currently studying my degree for IT and need a little help on Writing code for Java.
Basically, i need code that will save Text on Text ...
0
votes
0answers
8 views
Checking for spaces before/after a link element in XML using java parser
I'm parsing an xml document in which there may be some lines that look like this:
<para>This is a sentence. Here is my<link>link</link>.</para>
I want to be able to check ...
0
votes
3answers
33 views
Keep calculation going while loop freezes program and put a pause inbetween calculations
Hello i have this code where you click on several cubes to set them to dead or alive and according to a set of rules java will calculate which cells will be alive/dead after the next step.
import ...