Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
TheresaJayne
Jul 1, 2011

Yhag posted:

Hopefully a simple question:

Using Netbeans I created most of a small triangulation program for an assignment:



The grid is a seperate JPanel, relevant code:

code:
    @Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);

        g.setColor(Color.white);
        g.fillRect(35, 0, 600, 375);
        g.setColor(Color.black);
        g.drawRect(35, 0, 600, 375);
        g.setColor(Color.LIGHT_GRAY);

        for (int k = 0; k < 14; k = k + 1) {
            g.drawLine(36, 25 + k * 25, 634, 25 + k * 25);
        }

        for (int l = 0; l < 23; l = l + 1) {
            g.drawLine(60 + l * 25, 1, 60 + l * 25, 374);
            
        }
    }
On button click it calculates 2 coordinates xC and yC. I want to draw a line from (xA,yA) to (xC,yC) and from (xB,yB) to (xC,yC), relevant code:

code:
                    class jPanel2 extends Plot {

                        @Override
                        public void paintComponent(Graphics g) {
                            super.paintComponent(g);
                            g.setColor(Color.red);
                            g.drawline(xA, yA, xC, yC);
                            g.drawline(xB, yB, xC, yC);
                            Plot.repaint();

                        }
                    }


I run into two problems:

- Using Plot.repaint(); I get the following error:
non-static method repaint() cannot be referenced from a static context.
Googling it gets me solutions that are more complicated (to me) than this problem seems.

- Using doubles xA, yA, etc in the g.drawline() tells me:
incompatible types: posible lossy conversion from double to int
local variable xA is accessed from within inner class; needs to be declared final
.

My Java experience is pretty much zero so googling these errors doesn't really help much.

Thanks

Well you are trying to access a non static method in a static way,
Plot.repaint() is static

why not try super.repaint();

you have already done that with the paintComponent.

Adbot
ADBOT LOVES YOU

Yhag
Dec 23, 2006

I'm dying you idiot!

TheresaJayne posted:

Well you are trying to access a non static method in a static way,
Plot.repaint() is static

why not try super.repaint();

you have already done that with the paintComponent.

Thanks, that got rid of that error, it won't draw the line though, even if I just add something like g.drawline(0, 0, 100, 100);.

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

To be specific since you said you're new to this, you're calling the redraw method of Plot, which is a class (note the capitalisation at the start of the name). By the sounds of it, redrawing is something that only makes sense in the context of an instance, which is when you actually create a Plot-type object with its own state and then do things to it, like giving it drawing data then asking it to redraw itself.

Calling a method on the general class itself will either do some general purpose function, like performing some task in the program or returning a value (like when you call Math.sin() or whatever), or it will change something about the state of all Plot objects as a whole. It won't affect a single instance like you want it to - without passing it any info, it couldn't know which Plot object you wanted to mess with. It's like calling the head office.

So what you want to do is tell a specific instance to redraw itself, by calling redraw() on that object. Since your code is running in one of those objects, which is subclassed from Plot, you can just call the method, and it'll run it on itself

(Some of that may be technically squirrelly but I'm just trying to give a general idea here)

And how come you're trying to use doubles?

e- I'm just guessing here since I haven't used what you're using, but are you using two panels, one with the grid and one to draw a line on? (Since you've got two versions of the same method.) You're not calling redraw on the grid, which seems to work, why do you need it for the line - you're not clearing it after you've drawn it, are you? And are you sure the panel isn't beneath the first one?

baka kaba fucked around with this message at 08:19 on Sep 5, 2014

Yhag
Dec 23, 2006

I'm dying you idiot!
Thanks for the quick replies, made me realise I was calling on the wrong thing, it works now!

I was using doubles because they were being used in some example I had, using ints now and actually calling the proper redraw now.

Using this now for the grid panel:
code:
g.setColor(Color.red);
        g.drawLine(35 + p1xA, 375 - p1yA, 35 + p1xC, 375 - p1yC);
        g.setColor(Color.green);
        g.drawLine(35 + p1xB, 375 - p1yB, 35 + p1xC, 375 - p1yC);

    }
    public void setxA(int pxA) {
        this.p1xA = pxA;
    }
    public void setyA(int pyA) {
        this.p1yA = pyA;
    }
    public void setxB(int pxB) {
        this.p1xB = pxB;
    }
    public void setyB(int pyB) {
        this.p1yB = pyB;
    }
    public void setxC(int pxC) {
        this.p1xC = pxC;
    }
    public void setyC(int pyC) {
        this.p1yC = pyC;
    }
And this for the other one:
code:
                    int pxA = (int) (xA);
                    int pyA = (int) (yA);
                    int pxB = (int) (xB);
                    int pyB = (int) (yB);
                    int pxC = (int) (xC);
                    int pyC = (int) (yC);

                    pnlPlot1.setxA(pxA);
                    pnlPlot1.setyA(pyA);
                    pnlPlot1.setxB(pxB);
                    pnlPlot1.setyB(pyB);
                    pnlPlot1.setxC(pxC);
                    pnlPlot1.setyC(pyC);
                    
                    pnlPlot1.repaint();
I don't know if that's the fastests/easiest way, but it works.

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

If you're just using those p-variables as something to pass into your methods, you could just do

Java code:
pnlPlot1.setxA((int) xA);
Casting to int with (int) basically lops off the decimal, so you can just put that in the method call and it'll pass an integer value. This might be why you were getting that lossy conversion warning by the way: (int) 1.999999999999 becomes 1, which might not be what you want, so you might want to look at Math.round or something (which returns a long when you call it with a double, so you'd need to cast that to int too).

I'd be very tempted to turn all those set calls into one that passes an array, so you can do it all in a line or two, but it's not a huge deal if you're only doing it in one place

emanresu tnuocca
Sep 2, 2011

by Athanatos
More questions:
1. I'm trying to give default focus to one text field in a dialog box but even though I've used
code:
descriptionField.requestFocusInWindow();


the focus keeps defaulting to the radio buttons, seems like it just gives focus to the first added button? Any clue about this issue?

2. This is kinda silly but is there any way to give different levels in a JTree a preset icon rather than the default "Folder/Document" thing they've got going on? I just want Level 1 to always be a folder, level 2 something else and level 3 always a document, or something along those lines. I'm really not sure how to go about this.



carry on then posted:

The convention you're looking for is called a callback: http://en.wikipedia.org/wiki/Callback_(computer_programming). Your JDialog should hold a reference to the main frame that created it, and your main frame should have some method like AddTask(TaskManagerElement) that will do everything to get the task added. The JDialog calls this and passes the task over, then closes itself. It sounds like this is close to what you have now, and it's a common pattern in GUI applications.


rhag posted:

In Java this is also known as a "listener" (look at jbutton ActionListener for example).

Thanks guys, this was helpful!

1337JiveTurkey
Feb 17, 2005

emanresu tnuocca posted:

More questions:
1. I'm trying to give default focus to one text field in a dialog box but even though I've used
code:
descriptionField.requestFocusInWindow();


the focus keeps defaulting to the radio buttons, seems like it just gives focus to the first added button? Any clue about this issue?

Is the dialog visible when you make the request or are you doing it when you're laying out the component before you display it?

emanresu tnuocca
Sep 2, 2011

by Athanatos

1337JiveTurkey posted:

Is the dialog visible when you make the request or are you doing it when you're laying out the component before you display it?

Well, it wasn't, but now I fixed that and I execute the requestFocusInWindow() right after I set the frame visible, and it still gives focus to the checkbox.

I'm trying to look for stuff that might have gone wrong but as far as I can tell I finish populating the entire frame, then set it visible and only then request focus so it should work? :confused:

Wronkos
Jan 1, 2011

Why exactly does the JVM have to "warm-up"? Do any other languages have similar behavior at run-time?

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

The JVM will compile frequently executed code paths to machine code and store that. It needs time to figure out which paths to compile and save, during which all instructions are JIT compiled, and therefore slower.

I'm not sure specifically what other languages have this, but any with a compile-ahead capability activated based on the same reasoning would likely have a warm up period.

Fun fact: This is where hotspot gets its name from.

carry on then fucked around with this message at 02:59 on Sep 8, 2014

Gul Banana
Nov 28, 2003

the .net clr has similar behaviour

pliable
Sep 26, 2003

this is what u get for "180 x 180 avatars"

this is what u fucking get u bithc
Fun Shoe

Yhag posted:

And this for the other one:
code:
                    int pxA = (int) (xA);
                    int pyA = (int) (yA);
                    int pxB = (int) (xB);
                    int pyB = (int) (yB);
                    int pxC = (int) (xC);
                    int pyC = (int) (yC);

                    pnlPlot1.setxA(pxA);
                    pnlPlot1.setyA(pyA);
                    pnlPlot1.setxB(pxB);
                    pnlPlot1.setyB(pyB);
                    pnlPlot1.setxC(pxC);
                    pnlPlot1.setyC(pyC);
                    
                    pnlPlot1.repaint();
I don't know if that's the fastests/easiest way, but it works.

Is there a particular reason why you're casting all those ints, storing them into ints, then passing those ints along to your setxx methods instead of just casting them and passing them straight?

Like this:

code:
                    

                    pnlPlot1.setxA((int)xA);
                    pnlPlot1.setyA((int)yA);
                    pnlPlot1.setxB((int)xB);
                    pnlPlot1.setyB((int)yB);
                    pnlPlot1.setxC((int)xC);
                    pnlPlot1.setyC((int)yC);
                    
                    pnlPlot1.repaint();
It's not a huge deal but, I'm curious.

pliable fucked around with this message at 11:26 on Sep 11, 2014

TheresaJayne
Jul 1, 2011

pliable posted:

Is there a particular reason why you're casting all those ints, storing them into ints, then passing those ints along to your setxx methods instead of just casting them and passing them straight?

Like this:

code:
                    

                    pnlPlot1.setxA((int)xA);
                    pnlPlot1.setyA((int)yA);
                    pnlPlot1.setxB((int)xB);
                    pnlPlot1.setyB((int)yB);
                    pnlPlot1.setxC((int)xC);
                    pnlPlot1.setyC((int)yC);
                    
                    pnlPlot1.repaint();
It's not a huge deal but, I'm curious.

Well i have seen stuff like this in the past

code:
           int a = 10;
           int b = 0;
           b = (int)a;
Apparently this is because the person used to be a C++ developer and thats how they code C++ but i just think they had a problem with casting once and now cast everything just to be sure.

Volguus
Mar 3, 2009
In C the cast is cheap (not dynamic_cast though in C++), in Java is not. Java always does dynamic_cast (that is it checks the type, and throws ClassCastException or something along those lines) if the types don't match.
Therefore, don't cast (in Java) if you dont have to. Now, it could be that the compiler may compile that code away (or JIT at least), but still ... you don't have to, therefore don't. Even in C ... is dumb to cast an int to int (but there are rare cases where one needs to do crazy casts for some nefarious purposes).

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

TheresaJayne posted:

Well i have seen stuff like this in the past

code:
           int a = 10;
           int b = 0;
           b = (int)a;
Apparently this is because the person used to be a C++ developer and thats how they code C++ but i just think they had a problem with casting once and now cast everything just to be sure.

To be sure, that is completely unnecessary and you don't have to do that at all. Realistically in Java the vast majority of casting is to cast down to a subclass from a superclass to access subclass methods/fields. Occasionally you might see casting between float and int, but there are usually better/more accurate ways of doing even that (i=Math.round(f)).

pliable
Sep 26, 2003

this is what u get for "180 x 180 avatars"

this is what u fucking get u bithc
Fun Shoe

TheresaJayne posted:

Well i have seen stuff like this in the past

code:
           int a = 10;
           int b = 0;
           b = (int)a;
Apparently this is because the person used to be a C++ developer and thats how they code C++ but i just think they had a problem with casting once and now cast everything just to be sure.

I'm a C coder as well and maybe I'm fortunate enough to have gone to a great university, but if any of my professors saw this after 101, they would fail us immediately.

speng31b
May 8, 2010

carry on then posted:

To be sure, that is completely unnecessary and you don't have to do that at all. Realistically in Java the vast majority of casting is to cast down to a subclass from a superclass to access subclass methods/fields. Occasionally you might see casting between float and int, but there are usually better/more accurate ways of doing even that (i=Math.round(f)).

int i=(int)(f+0.5f); if you're allergic to method calls and clarity.

HFX
Nov 29, 2004

carry on then posted:

To be sure, that is completely unnecessary and you don't have to do that at all. Realistically in Java the vast majority of casting is to cast down to a subclass from a superclass to access subclass methods/fields. Occasionally you might see casting between float and int, but there are usually better/more accurate ways of doing even that (i=Math.round(f)).

Math.round doesn't return the same value as casting does though. Casting does round towards zero though.

HFX fucked around with this message at 17:33 on Sep 12, 2014

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

HFX posted:

Math.round doesn't return the same value as casting does though. It does round towards zero though.

That's what I meant. Casting is truncation but I know some rookies think it's the same as rounding, then wonder why their 4.9999 casted to 4 and not 5.

speng31b
May 8, 2010

HFX posted:

Math.round doesn't return the same value as casting does though. It does round towards zero though.

No, but Math.floor works if you want to explicitly replicate casting behavior. Unfortunately you then have to cast the result back to an int again, which is self-defeating!

HFX
Nov 29, 2004
I just edited my post above as the way I wrote it would have been wrong assuming usual English usage. My post above needed to be more clear about the "it".

Casting will always round towards 0 including negative values. This means the correct behavior would be to use Math.ceil for negative values and Math.floor for positive values. The (int)(f+0.5f) only works for positive values sadly.

I had to learn this the hard way a few times while I was an undergrad. Learning about C and how numbers are represented helped a lot.

evilentity
Jun 25, 2010

CarrKnight posted:

First of all, thank you for all the answers.

Exactly!

Okay, to clarify what I need. Imagine a very, very lovely sim-city. Take model-view-controller abstraction.

The model is the citizens, the markets, the rules of trading, the geography. All that stuff. It has to be in Java. This is because the end goal of these models is peer-review. And since others in my field code in Java, I need to do the same. I show up with go or dart and people just don't know what they are looking at.

The view and the controller, I'd like to be native in the browser. This makes for much easier prototyping and I can let my audience play with the model before it is complete and before they need to plunge into the source code.
I can code this in any language i see fit. Peers don't care.

Now, what I don't understand is, if I learn HTML5 or Javascript or whatever do I need to implement a server-client interaction? If so, what machine is actually running the model (the city simulation)?
That's what I liked about applets. It would just work out of the box.

If you want to do the codes in java for 2d game, and make it run in modern browser, use libgdx. With very little work you can compile it js and run in a browser. No need to implement client-server stuff. But you would need to rewrite a bunch of stuff, mostly the rendering/gui. Heres an old demo of my android game running in a browser, no plugins or anything required

FamDav
Mar 29, 2008
What's a good book or two for getting an understanding of Java 8 as well as patterns for writing java well? I'm guessing effective java and another book?

Gravity Pike
Feb 8, 2009

I find this discussion incredibly bland and disinteresting.

FamDav posted:

What's a good book or two for getting an understanding of Java 8 as well as patterns for writing java well? I'm guessing effective java and another book?

Effective Java and Java Concurrency in Practice are my two go-to Java books. They're not going to cover 8, but honestly, there's not so much new stuff that you wouldn't be better off reading blog posts.

CarrKnight
May 24, 2013

evilentity posted:

If you want to do the codes in java for 2d game, and make it run in modern browser, use libgdx. With very little work you can compile it js and run in a browser. No need to implement client-server stuff. But you would need to rewrite a bunch of stuff, mostly the rendering/gui. Heres an old demo of my android game running in a browser, no plugins or anything required

That looks really cool. Let me take a look. You were very kind. Thanks.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

FamDav posted:

What's a good book or two for getting an understanding of Java 8 as well as patterns for writing java well? I'm guessing effective java and another book?

Also turn on the Java 8 inspections in your IDE, IntelliJ will let me know I'm not doing certain things the Java 8 way, it has been pretty handy.

Azerban
Oct 28, 2003



Yeah, libgdx seems super neat and easy to use? Makes me want to get an iOS test device.

CarrKnight
May 24, 2013
I want to know, is google GWT kind of like libgdx?
Libgdx is cool, great. I like the easy life-cycle. But I need boring ui. With buttons and charts. Kind of like the GWT widgets! But is gwt just a client gui with the java part running on a server? Or is it like libgdx where the whole java is magically turned into javascript and run in browser?

Marsol0
Jun 6, 2004
No avatar. I just saved you some load time. You're welcome.

CarrKnight posted:

I want to know, is google GWT kind of like libgdx?
Libgdx is cool, great. I like the easy life-cycle. But I need boring ui. With buttons and charts. Kind of like the GWT widgets! But is gwt just a client gui with the java part running on a server? Or is it like libgdx where the whole java is magically turned into javascript and run in browser?

libgdx uses GWT when it builds for web

evilentity
Jun 25, 2010
You can make boring gui in libgdx just fine. spine 2d is made in libgdx.

evilentity fucked around with this message at 20:44 on Sep 18, 2014

Volguus
Mar 3, 2009

CarrKnight posted:

I want to know, is google GWT kind of like libgdx?
Libgdx is cool, great. I like the easy life-cycle. But I need boring ui. With buttons and charts. Kind of like the GWT widgets! But is gwt just a client gui with the java part running on a server? Or is it like libgdx where the whole java is magically turned into javascript and run in browser?

GWT just turns java code into javascript. you can have whatever you want on the server side (servlets in java, nodejs, python whatever floats your boat).

CarrKnight
May 24, 2013

evilentity posted:

You can make boring gui in libgdx just fine. spine 2d is made in libgdx.

That looks fantastic. But it is proprietary.
Is there anything similar that is open-source enough for me to peek?

Cool Dogs Only
Nov 10, 2012
I was trying to write a simple program that plays pool (badly) but I came across a problem. In my main function I have something like
code:
while (myGUI.getStart() == false)
{
	// Wait
}
which would wait until the user presses the start button in the JPanel that pops up. My problem is that this loop never finishes even if the button is clicked (a print statement in the actionListener shows it works) and start is set to true unless I either print something to the terminal or use Thread.sleep(1) (or any number) within the while loop. What's happening here? If it's something about how the main thread communicates with the EDT thread, can someone show me where I can learn more about that? Thanks.

Volguus
Mar 3, 2009

Cool Dogs Only posted:

I was trying to write a simple program that plays pool (badly) but I came across a problem. In my main function I have something like
code:
while (myGUI.getStart() == false)
{
	// Wait
}
which would wait until the user presses the start button in the JPanel that pops up. My problem is that this loop never finishes even if the button is clicked (a print statement in the actionListener shows it works) and start is set to true unless I either print something to the terminal or use Thread.sleep(1) (or any number) within the while loop. What's happening here? If it's something about how the main thread communicates with the EDT thread, can someone show me where I can learn more about that? Thanks.

Threads are ... complicated (to put it mildly). Start here: http://docs.oracle.com/javase/tutorial/essential/concurrency/ and go from there. It should tell you all you need to know for basic needs.

CarrKnight
May 24, 2013

quote:

My problem is that this loop never finishes even if the button is clicked (a print statement in the actionListener shows it works) and start is set to true unless I either print something to the terminal or use Thread.sleep(1) (or any number) within the while loop
For these things you really ought to use a semaphore.
But i am curious, what happens in the //wait part?

Cool Dogs Only
Nov 10, 2012

CarrKnight posted:

For these things you really ought to use a semaphore.
But i am curious, what happens in the //wait part?

Funny you say that, I just learned about semaphores in class today. And nothing happens in the wait part, I just wanted to keep repeating the loop. I'll look into semaphores and the concurrency guide, thanks guys.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Cool Dogs Only posted:

Funny you say that, I just learned about semaphores in class today. And nothing happens in the wait part, I just wanted to keep repeating the loop. I'll look into semaphores and the concurrency guide, thanks guys.

Just never block the main thread, and you won't worry about "huh, I wonder why my app locked up?" nearly as much.

pigdog
Apr 23, 2004

by Smythe

Cool Dogs Only posted:

I was trying to write a simple program that plays pool (badly) but I came across a problem. In my main function I have something like
code:
while (myGUI.getStart() == false)
{
	// Wait
}
which would wait until the user presses the start button in the JPanel that pops up. My problem is that this loop never finishes even if the button is clicked (a print statement in the actionListener shows it works) and start is set to true unless I either print something to the terminal or use Thread.sleep(1) (or any number) within the while loop. What's happening here? If it's something about how the main thread communicates with the EDT thread, can someone show me where I can learn more about that? Thanks.

It's because things that are happening in another thread may, as far as the first thread is concerned, happen in a completely different order or time unless some form of synchronisation is used. You hear about CPUs having out-of-order and predictive execution, hyperthreading, three levels of cache and whatnot -- all that is leveraged by the computer and the JVM to make things faster, at the cost of things happening in one thread being invisible or looking totally bizarre when viewed from another thread. For example there's a value at memory location X that is increased by thread A. The CPU reads the value from RAM, increments it, but stores it in cache for time being. Thread B may be looking for the increased value, but reading from X would yield the old value, since the CPU hadn't bothered to write A's new value down yet. Thread B may be writing something different into X, but sometime later the CPU may be flushing its cache and write the old, increased value from A back to X again, overwriting whatever B wrote in it meanwhile. Weird rear end poo poo would happen.

There are some ways of restoring sanity to the universe and synchronizing the happened-beforeness of two threads. Simplest is to declare variables volatile. Suppose myGUI.getStart() returns the value of boolean field myGUI.start. If you then replaced the declaration of boolean start; with volatile boolean start;, then all changes to that variable would be guaranteed to be immediately visible to other threads, and changing start to false would immediately end your loop. Mind you, volatile variables can still be used in a non-threadsafe manner since in eg if (myGui.getStart==false) { myGui.setStart(true); } the start variable could be changed by another thread between checking it and setting it true. There are Atomic* wrapper types to help with that sort of thing.

The other and most useful way is synchronization, but I really can't be bothered to write too much on the subject. Basically, if you need to share information between two threads, it usually needs to go through a synchronised block of code which could only be executed by one thread at a time, and the threads would synchronize their state when they arrive to that block of code. Writing to System.out, as far as I know, is synchronised, which means before they call that line your threads get their poo poo together enough for it to also help with seeing your getStart() value change.

horse_ebookmarklet
Oct 6, 2003

can I play too?
I'm confused about CancelledKeyExceptions and a SelectionKey when using NIO Selectors.
I have a situation where an underlying socket channel may be closed by any thread. In a thread separate from where a channel is cancelled, I am calling select() with channels that are registered with OP_READ.
Occasionally I get a CancelledKeyException when I test isReadable(). Clearly another thread is closing a socket channel after select() has returned but before I test isReadable().

I believe my best course of action is to catch a CancelledKeyException. My only concern is that this is an unchecked runtime exception, which would seem to indicate a unrecoverable condition or programming error on my part...
Some references on stack overflow suggest testing isValid() && isReadable(), but this has an obvious time-of-check-time-of-use error.

Other than catching an unchecked exception, I do not understand how else to detect and recover from this condition.

Adbot
ADBOT LOVES YOU

pigdog
Apr 23, 2004

by Smythe
Nothing wrong with unchecked runtime exceptions, in fact they can be neater than checked exceptions as they don't clutter the interfaces so much. As long as you remember to catch them at one point.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply