Hello everyone,
I was playing around with Java Swing since i wanted to learn more about it. I have 2 .java files as follows:
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
Type: Posts; User: hemla
Hello everyone,
I was playing around with Java Swing since i wanted to learn more about it. I have 2 .java files as follows:
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
Hi all,
JButtons by default creates rectangular buttons. I'd like to change the shape to a circle. The following is my code:
public void createButtons(JPanel bottomPanel) {
JButton[]...
Hi all,
I'm trying to import a project into eclipse. I've imported one successfully and it shows both in the Git and Java perspective. But the second project shows only in the Git perspective but...
I finally got it. I just had to export the .jar file from eclipse itself. And then i had to extract the manifest file too.
I found the class with the main method, and converted the .java file into a .jar file...but it comes up with an error.:confused:
i want to work on a project and hence i asked. i've made simple java programs in the past but have never worked with a game. Even i was wondering how do i play it? i've got it set in eclipse, but...
i do not see any .jar files after importing from github? :S
Hi all,
I've imported a game from github into eclipse. There are no errors in the class files. I wanted to know how do I actually run the game on my computer?
Hi all,
I'd like to download an open source project from sourceforge and import it into eclipse. It has a .jar file which i have downloaded and i imported it into eclipse. But when i click on the...
:confused:
Hey everyone,
I want to create a class that would return an array of pairs that have the same length as the input array of strings.
In addition, the pair should have the first letter...
Hey guys,
The following is my code:
public class OneB {
/**
* @param args
*/
public static int[] sumDiffs(int[]a, int[]b){
Got the desired result!! i was supposed to type in System.out.println(java.util.Arrays.toString(maxEnd(new int[]{1, 2, 3})));
Thanks a lot for the help! :)
also i get the error, cannot find symbol variable nums after typing in System.out.println("[I@3487a5cc "+ java.util.Arrays.toString(nums))
could u please correct it? need it really urgent and i...
You mean: System.out.println("[I@3487a5cc "+ java.util.Arrays.toString(nums)); ? :S
i have to write a code to verify the following:
maxEnd(new int[]{1, 2, 3}) -> {3, 3, 3}
maxEnd(new int[]{1, 3}) -> {3, 3}
maxEnd(new int[]{3}) -> {3}
Here's my code:
public class OneB {...
Hello, i'd like to confirm the following:
suppose the question is: we have three int's (int a, int b, int c) and the value is true if and only if the sum of a and c is greater than b, then b is...
Hello, i'd like to know what do the following mean in java?
.split("/")
.split("\\.")
Also while iterating, for example:
[code=Java]
about the link Norm provided..i know that...i need the explanation to "test" "arrays" in a terminal.
If i just type java OneA i get the following error: Exception in thread "main" java.lang.NoSuchMethodError: main
I know it's java OneA but after that what should be written so that it can give me...
public class OneA {
public int product( int [] a ) {
int product = 1;
for ( int i = 0; i < a.length; i++ ) {
product *= a[i];
}
return product;
}
}
output at the terminal should look like : noTriples({1, 1, 2, 2, 1}) -> true
noTriples({1, 1, 2, 2, 2, 1}) -> false
Basically there should be no triples in the code. if there are any, it returns...
for (i = 0; i < numbers.length - 2; i++)
In some codes we write i<numbers.length and in some numbers.length-1 or some others. What does this piece of code actually mean?
double mean, sum = 0, sum2 = 0, var;
What does the above line mean?
Yes, i've looked up into that and the code is supposed to calculate the mean and variance and print it out on two separate lines. The mean of N data items is calculated by adding up all the items and...
public class MeanVariance {
public static void main (String[] args) {
int len = args.length;
double[] data = new double[len];
double mean, sum = 0, sum2 = 0, var;
for (int i...