1
2
3
4
try{
	res = LB + (r.nextInt(UB - LB));
}catch(IllegalArgumentException num){
...

Java On Guessing Game

by Eunseok, March 05, 2010 03:45

Your Program Source is happ...

336dc9b9daa024d7c1733ba039ea200d Talk

Java On Get a random number within ...

by Canvas Prints, March 02, 2010 15:41

Yes I thought that it would...

5d2dab841e4379fda992ef07a7ac4308 Talk
1
2
3
Obj lookup(String name) {
...

Java On Linked list traversal, comp...

by foo, March 01, 2010 00:38
Avatar Talk
1
2
3
File mydir = new File("C:\\mydir");
File myfile = new File("C:\\mydir\\path\\myfile.txt");
System.out.println(mydir.toURI().relativize(myfile.toURI()).getPath());

Java On get path of a File relative...

by Andy Roberts, January 21, 2010 15:42

There's some code on StackO...

Avatar Talk

Java On Factoring Integers

by yma, January 19, 2010 11:44

If i call hasMoreFactors() ...

468801491c148e645fe6e5109bae6038 Talk

Java On Rational numbers - Problem :/

by Ants, January 07, 2010 08:12

Huh? lessThanOrEqual() does...

F9a9ba6663645458aa8630157ed5e71e Talk

Java On Refactor my brute forcer!

by Sly, December 15, 2009 20:23

add a synchronized method l...

Avatar Talk

Java On Test

by suhasj.myopenid.com, December 04, 2009 05:58

test

69dc496c749724ca4ca9faf94b1316d4 Talk

Java On Problem with Permutation Class

by Ants, November 07, 2009 04:11

Well... line 11 says you ar...

F9a9ba6663645458aa8630157ed5e71e Talk

Java On Rational numbers

by dragon, October 29, 2009 22:20

please help me with this pr...

487d355c629ea7255e3dace05a800036 Talk

Java On FactorGenerator Class &...

by b-kovar.myopenid.com, October 22, 2009 20:52

nah never mind I got it wit...

Avatar Talk
1
2
3
4
    // NOTE: Compiling the 'input.sch' is needed only once.
    private final Transformer transformer = compileTransformer();
    
...

Java On Multiple XSLT for Schematro...

by zetafish, October 09, 2009 14:15

Compiling the schematron fi...

220a1ce7a99b513ece2aca0f6d4688c7 Talk
1
2
3
4
public class JImagePanel extends JPanel {
BufferedImage img;
public JImagePanel(){
...

Java On Background Image

by Marcos Vasconcelos, September 30, 2009 16:33

The correct is override pai...

8a3f52058098379cd556f98d5f3aa38b Talk
1
bool LY(int y){return y%4==0?y%100?true:y%400==0?true:false:false;}

Java On Leapyear

by Gice, September 27, 2009 22:56

If you want no-one to see w...

Avatar Talk
1
2
3
4
package engine;

public class StringFunctions {
...

Java On Refactor, fix and optimize ...

by MetroidFan2002, September 19, 2009 06:49

The escape function is the ...

60929e8e0445f0070e501f5ded8ad348 Talk
1
2
3
4
package engine;

public class StringFunctions {
...

Java On Refactor, fix and optimize ...

by MetroidFan2002, September 19, 2009 06:46

The escape function is the ...

60929e8e0445f0070e501f5ded8ad348 Talk
1
2
3
4
package engine;

public class StringFunctions {
...

Java On Refactor, fix and optimize ...

by MetroidFan2002, September 19, 2009 06:43

The escape function is the ...

60929e8e0445f0070e501f5ded8ad348 Talk

Java On get path of a File relative...

by David, August 31, 2009 23:08

i would like to use the sec...

391a4395921d2dfcdd0c9d3b40edbee1 Talk

Java On speed up this horrendous co...

by Andrew Binstock, August 25, 2009 03:28

Learn and use the Command p...

Afe06fcff0c2bd97c94eda4ba0bcc483 Talk

Java On Get a random number within ...

by software development london, August 18, 2009 08:48

Interesting,

I'm much easi...

3aa63bb586c5c59f9fc6b2afb9417821 Talk
1
2
3
4
/**
 * a. Instead of "foo", "biz" or "baz", the factors of the number should be shown after it if the 
 *    number is not a prime number. Otherwise, the sentence "The number is prime." is shown
...

Java On Factoring Integers

by tetrojensen, August 17, 2009 05:14

How do I do this.....

0ac78925885364ab608c701ffd5c1626 Talk
1
2
3
public class RegExpExample {
	public static void main(String[] args) {
...

Java On replace with regex

by Marco Valtas, August 12, 2009 03:10 Star_fullStar_fullStar_fullStar_full

Here's my example, use a si...

B8d457d2c39911ea4c74ba7d66b9c3f7 Talk
1
2
3
4
import java.io.File;

public class Path {
...

Java On replace with regex

by Ben Atkin, August 08, 2009 00:03 Star_fullStar_fullStar_fullStar_full

Here's my take on it. I add...

70b0265140eaff6e312eb3efcff3c195 Talk
1
2
3
file.getAbsolutePath()
  .replaceFirst(".*?classes[\\\\/](.*?)\\.class", "$1")
  .replaceAll("[\\\\/]", ".");

Java On replace with regex

by mikenereson.blogspot.com, August 07, 2009 14:29

Fixed slashes to handle mor...

9db8f865b1d5f3e3978b37e7a3480cc4 Talk
1
2
3
String s = ...
String regex1 = .*?classes/(.*?)\.class
...

Java On replace with regex

by Ryan, August 07, 2009 14:21 Star_fullStar_fullStar_fullStar_fullStar_full
E4358a6dc7aea1d2b79045522c2dab52 Talk