java Programming Glossary: don't
Why is Java Vector class considered obsolete or deprecated? http://stackoverflow.com/questions/1386275/why-is-java-vector-class-considered-obsolete-or-deprecated Isn't its use valid when working with concurrency And if I don't want to manually synchronize objects and just want to use a.. course it also has the overhead of locking even when you don't need to. Basically it's a very flawed approach to synchronization..
How to discover memory usage of my application in Android http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android on top of that paging out to disk let alone swap which we don't use on Android and it is even less clear. Thus if you were to..
Is List<Dog> a subclass of List<Animal>? Why aren't Java's generics implicitly polymorphic? http://stackoverflow.com/questions/2745265/is-listdog-a-subclass-of-listanimal-why-arent-javas-generics-implicitly-p you can't add a Cat to a List extends Animal because you don't know it's a List Cat . You can retrieve a value and know that.. in that case you can add an Animal to it safely but you don't know anything about what might be retrieved from it because..
How to use java.net.URLConnection to fire and handle HTTP requests? http://stackoverflow.com/questions/2793150/how-to-use-java-net-urlconnection-to-fire-and-handle-http-requests the server what encoding the parameters are in. If you don't send any query string then you can leave the Accept Charset.. then you can leave the Accept Charset header away. If you don't need to set any headers then you can even use the URL#openStream.. whenever you'd like to submit a HTML form programmatically don't forget to take the name value pairs of any input type hidden..
How to call SOAP web service in Android http://stackoverflow.com/questions/297586/how-to-call-soap-web-service-in-android
Download a file with Android, and showing the progress in a ProgressDialog http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog connection.connect expect HTTP 200 OK so we don't mistakenly save error report instead of the file if connection.getResponseCode..
How to avoid Java Code in JSP-Files? http://stackoverflow.com/questions/3177733/how-to-avoid-java-code-in-jsp-files url pattern covering the JSP pages of interest then you don't need to copypaste the same piece of code over all JSP pages... Facelets has already implicit HTML escaping so you don't need to worry about XSS holes in Facelets. See also Hidden features..
JSTL in JSF2 Facelets… makes sense? http://stackoverflow.com/questions/3342984/jstl-in-jsf2-facelets-makes-sense versions older than 2.1.18. Before this version they don't work well together with view scoped beans when partial state..
Is Java “pass-by-reference”? http://stackoverflow.com/questions/40480/is-java-pass-by-reference couple of blog posts e.g. this blog that claim it's not. I don't think I understand the distinction they're making. Could someone..
In Java, what is the best way to determine the size of an object? http://stackoverflow.com/questions/52353/in-java-what-is-the-best-way-to-determine-the-size-of-an-object rows based on types of data but I want to make sure that I don't read in too many rows of data and cause OutOfMemory Exceptions...
How to: generic array creation http://stackoverflow.com/questions/529085/how-to-generic-array-creation clazz capacity private final T array But I really don't get what's going on. Can anyone help java arrays generics reflection.. Java it was implemented using erasure so generic classes don't know what type argument they were created with at run time and..
Should I avoid the use of set(Preferred|Maximum|Minimum)Size methods in Java Swing? http://stackoverflow.com/questions/7229226/should-i-avoid-the-use-of-setpreferredmaximumminimumsize-methods-in-java-swi setMinimumSize setMaximumSize on Swing components. I don't see any alternative to their use when I want to define proportions.. between systems with different screen resolution . I don't think any LayoutManager can exactly satisfy all desired layout.. when should I use them In which context For what purposes don't know personally I think of it as an api design accident. Slightly..
What kind of OCR Java library should I use in Android? [closed] http://stackoverflow.com/questions/1062578/what-kind-of-ocr-java-library-should-i-use-in-android I use java android ocr share improve this question Don't know how good it is it definitely needs to be trained first..
the images are not loading http://stackoverflow.com/questions/12642852/the-images-are-not-loading You're image loading code is wrong. Use ImageIO instead Don't store the rectangle reference directly. The problem is if the..
Drawing a rectangle that won't disappear in next paint http://stackoverflow.com/questions/12683533/drawing-a-rectangle-that-wont-disappear-in-next-paint graphics jpanel paint share improve this question Don't override paint WITHOUT VERY VERY good reason...use paintComponent..
Is it possible in Java to access private fields via reflection [duplicate] http://stackoverflow.com/questions/1555658/is-it-possible-in-java-to-access-private-fields-via-reflection main String args Just for the ease of a throwaway test. Don't do this normally throws Exception Other t new Other t.setStr..
Java NIO FileChannel versus FileOutputstream performance / usefulness http://stackoverflow.com/questions/1605332/java-nio-filechannel-versus-fileoutputstream-performance-usefulness 2KB 4KB 8KB 16KB 32KB and 64KB to prove it to yourself. Don't perform java benchmarks that read and write to the same disk... then you are probably experience some other bottle neck. Don't use a buffer if you don't need to. Why copy to memory if your..
How should I validate an e-mail address on Android? http://stackoverflow.com/questions/1819142/how-should-i-validate-an-e-mail-address-on-android android email validation share improve this question Don't use a reg ex. Apparently the following is a reg ex that correctly..
ResultSet to Pagination http://stackoverflow.com/questions/1986998/resultset-to-pagination the value of firstrow with the value of rowcount . Don't forget to handle negative values and overflows correctly You..
How to upload files to server using JSP/Servlet? http://stackoverflow.com/questions/2422468/how-to-upload-files-to-server-using-jsp-servlet would all return null when using multipart form data. Don't manually parse it You can in theory parse the request body yourself..
Best Practice: Initialize class fields in constructor or at declaration? http://stackoverflow.com/questions/24551/best-practice-initialize-class-fields-in-constructor-or-at-declaration c# java share improve this question My rules 1. Don't initialize with the default values in declaration null false..
What is a raw type and why shouldn't we use it? http://stackoverflow.com/questions/2770321/what-is-a-raw-type-and-why-shouldnt-we-use-it is a quote from Effective Java 2nd Edition Item 23 Don't use raw types in new code Just what is the difference between..
Is it possible to use JSF+Facelets with HTML 4/5? http://stackoverflow.com/questions/2935759/is-it-possible-to-use-jsffacelets-with-html-4-5 is because it's so cool for some unclear reason. Shrug . Don't get me wrong. XHTML is great as server side view technology...
How do I programmatically compile and instantiate a Java class? http://stackoverflow.com/questions/2946338/how-do-i-programmatically-compile-and-instantiate-a-java-class working directory is recipe for portability trouble. Don't do that. Put that file in classpath and use ClassLoader#getResourceAsStream..
Validating input using java.util.Scanner http://stackoverflow.com/questions/3059333/validating-input-using-java-util-scanner hasNextXXX does not advance the Scanner past any input. Don't be shy to create multiple Scanner if necessary. Two simple Scanner..
Simplest way to print an array in Java http://stackoverflow.com/questions/409784/simplest-way-to-print-an-array-in-java is even decorated in the exact way you're asking. Edit Don't forget to add import java.util.Arrays like this package packageName..
Prevent user from going back to the previous secured page after logout http://stackoverflow.com/questions/4194207/prevent-user-from-going-back-to-the-previous-secured-page-after-logout where you're checking the presence of the logged in user. Don't forget to clear browser cache before testing share improve..
Java string to date conversion http://stackoverflow.com/questions/4216745/java-string-to-date-conversion java string date time share improve this question Don't do it that's the hard way. Just use SimpleDateFormat click the..
uploading of pdf file http://stackoverflow.com/questions/5038798/uploading-of-pdf-file First of all it is the worst learning resource ever. Don't use it. It only teaches bad practices. Add that site to your..
Load a resource contained in a jar http://stackoverflow.com/questions/574809/load-a-resource-contained-in-a-jar resource using a FileInputStream or something like that. Don't do that instead of calling getResource call getResourceAsStream..
How to set the java.library.path from Eclipse http://stackoverflow.com/questions/957700/how-to-set-the-java-library-path-from-eclipse configuration buildpath share improve this question Don't mess with the library path Eclipse builds it itself Instead..
|