Quantcast
Channel: DeveloperFeed » Java Tutorials
Browsing latest articles
Browse All 10 View Live

Programmatically Toggle Function Keys

The function keys of the keyboard  Caps Lock, Num Lock and Scroll Locks keys can be turned on or off programmatically via the simple API available in the Toolkit class. This feature is very helpful in...

View Article



How to count lines in the file using Java?

It’s easy to simple count the lines in a file using Unix commands like grep filename | wc -l This would return you the number of lines in the file. However if you have to know that programmatically...

View Article

How to encode URL?

URLEncoder is the utility class for HTML form encoding is part of JDK API. This class contains static methods for converting a String to the application/x-www-form-urlencoded MIME format. Custom...

View Article

Write a program to compute factorial of a number in Java

In mathematics, the factorial of a positive integer  n  denoted by n!, is the product of all positive integers less than or equal to n. For example,    5 ! = 1 x 2 x 3 x times 4 x 5 = 120  0! is a...

View Article

Write a program to generate Prime Numbers

In mathematics, a prime number (or a prime) is a natural number that has exactly two distinct natural number divisors: 1 and itself. The first twenty-five prime numbers are: 2, 3, 5, 7, 11, 13, 17, 19,...

View Article


Write a program to generate Fibonacci Numbers

In mathematics, the Fibonacci numbers are the numbers in the following sequence: 0,1,12,3,5,8,13,21,34,55,89,144 By definition, the first two Fibonacci numbers are 0 and 1, and each remaining number is...

View Article

How to select a JVM Analyzing Tool?

A JVM monitoring tool also know as a Diagnostic might be needed to fine tune your Java application for performance, reduce memory footprint, avoid contention/deadlocking etc. As such selecting a right...

View Article

A typical ShutdownHook in Java

Shutdown hooks are a very important feature of the JVM. They provide the capability to do resource cleanup or store application state when the JVM shuts down. In a typical application there are lot of...

View Article


How to send Email from a Gmail account using Java?

Sending email from a Gmail account can be done easily using the classes from the javax.mail package. Gmail supports both SSL and TLS as the protocol to make a secure connection from the email client to...

View Article


How to enable Java in Internet Explorer 8.0?

If the Java Plugin is not installed or enabled the applet would not run in the Internet Explorer as seen the screen shot below. <! In order to enable Java in Internet Explorer, perform the following...

View Article
Browsing latest articles
Browse All 10 View Live




Latest Images