Java is an object-oriented language and runtime environment (JRE). Java programs are compiled to bytecode and run in a virtual machine (JVM).

learn more… | top users | synonyms (4) | java jobs

0
votes
3answers
20 views

Why does Java's type erasure not break this?

public class Test { public static class Nested<T> { public T val; Nested(T val) { this.val = val; } } public static void main(String[] args) { ...
0
votes
0answers
15 views

Java Enum Class in C++

What would be the equivalent of the following Java Enum class in c++? I'm porting some code over to c++ and having a hard time figuring out how to get the same behaviour in c++ I can get with Java. ...
0
votes
0answers
8 views

Python - how can i read in and read out so that other readers can read it for further pursing?

I have to run the Java application and read the syslog to trigger some other Python based events. At the same time i also need to dump and store it in /var/tmp/log.log of all java outputs, but ...
-2
votes
1answer
16 views

Java, drawing the runtime stack

Can anyone help me draw the run time stack from the comment HERE for the following code? I attempted this, but was told it was incorrect, and my professor refused to explain this.... If anyone can ...
0
votes
0answers
9 views

Custom Annotation Processor - Detect Method with Annotations

I am trying to write an annotation Procssor to detect the methods that are annotated with the @PrintMethod annotation. For example in the test Class below, i want to print the codes within the test ...
0
votes
0answers
22 views

A better way to use a null checked, type casted value?

I'm writing a library similar to AQuery but with a refined syntax for manipulating elements. Essentially what AQuery does is safely access the view hierarchy and allow you to call subclass methods ...
0
votes
0answers
4 views

Passing edittext values through handler (ProgressDialog)

I am encountering a problem in my Android application. I am creating a currency converter. I need to create a progressdialog that appears when you convert a value from one currency to another. I ...
0
votes
1answer
13 views

Graphics don't appear when adding if statement in update() void

I was working to create my first game with a simple 2d game engine. Anyways, each time I add if (input.KEY_RIGHT) x++;, the canvas doesn't load. It only shows the background of the JPanel. But when I ...
0
votes
2answers
27 views

Complex loop help. Java

This program is a simple card game and I am hung up on one complex loop. This "fire" card needs to check its 2 neighbor gameboard slots to see if it is occupied by another card, and if so, if it is a ...
0
votes
4answers
28 views

NumberFormatException: Infinite or NaN

I have a method that takes n and returns nth Fibonacci number. Inside the method implementation I use BigDecimal to get the nth Fibonacci number then I use method toBigInteger() to get the number as a ...
0
votes
1answer
18 views

Method Calling Not Working?(Java NullPointerException)

Here is my main code: package main; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Panel extends JPanel{ public Thread update; public YourPaddle pa; ...
0
votes
0answers
6 views

jericho-html - text extracting and incorrect text lenght

Today I tried to use the lib as jericho-html-3.2 to extract text from simple html... And I faced a strange text fake length problem as follows: if I have html as this one Hello World ...
0
votes
0answers
11 views

Android: rotate canvas around the center of the screen

I'm trying to rotate the canvas around the center of the screen, to get the (0,0) coordinates at the bottom right. This is how I do it: Display display = getWindowManager().getDefaultDisplay(); int ...
0
votes
4answers
64 views

Is there a better way to implement those nested loops?

Suppose having three arrays: char [] one = {'a','b','c'}; char [] two = {'1','2','3'}; char [] three = {'x','y','z'}; If I want to print them like this: a 1 x a 1 y a 1 z a 2 x a 2 y ..... c 3 z ...
-2
votes
1answer
23 views

Jar file not running in Ubuntu

I have created a basic file browser in Java. I exported it to a runnable Jar file in eclipse. It works fine on my windows machine, however when I try to run it on my Ubuntu machine from the command ...

1 2 3 4 5 30393
15 30 50 per page