GT's Blog
Code snippets, technical articles, tips on computing and programming...
Pages
(Move to ...)
Type in Nepali Unicode Romanized - Convert Roman Nepali to Unicode Tool
▼
wrapper classes in Java
›
Describe the wrapper classes in Java. Wrapper class is wrapper around a primitive data type. An instance of a wrapper class contains, or wra...
Java Class as Applet as well as Application
›
Can you write a Java class that could be used both as an applet as well as an application? A. Yes. Add a main() method to the applet.
Bring JFrame JDialog Window to front java swing
›
To bring JFrame or JDialog ... or Window (JFrame and JDialog inherits Window) to front in JAVA, fun the code below : java.awt.EventQueue...
Redirect Standard System Output and Error Message to PrintStream in Java
›
In a Java program, how can you divert standard system output or error messages, say to a file? ->We can achieve this by using public st...
concatenate arrays of any type - java
›
Combining two arrays of any type public static T[] concat(T[] first, T[] second) { T[] result = Arrays.copyOf(first, first.length + se...
difference between an interface and an abstract class
›
What's the difference between an interface and an abstract class? Also discuss the similarities. (Very Important) Abstract class is a ...
Adding image to JPanel Java
›
Adding Image to JPanel BufferedImage myPicture = ImageIO.read(new File("path-to-file")); JLabel picLabel = new JLabel(new ImageI...
Read time from internet time server - working java code
›
Read time from internet time server - working java code import java.io.*; import java.net.*; import java.util.*; /** * This program makes...
iterate through map hashmap linkedhashmap in java
›
How to iterate through Map.. MashMap, LinkedHashMap ... in Java Method 1 : If you're only interested in the keys, you can iterate thr...
java escape text in regular expression
›
Java's a built-in way to escape arbitrary text so that it can be included in a regular expression- For example, users enter "$5...
‹
›
Home
View web version