Java Source Code

Free Java Source Code Example and System's Project. Download from the list of free java source code below. You can modify the source code and use it in your personal project.

Simple Image Viewer in Java

Introduction In this tutorial we will learn how to display picture in Java Application. There is difference between how a picture displayed in application and applet. For application we require drawImage() method which draws the image to specific component and not the entire frame. Implementation Step 1: Creating the components We require a label, text field where user will enter name or address

Word Counter in Java

Here is a Java program I made in Java that counts the number of words and number of lines in of an inputted String. Check this out! import java.util.Scanner; public class PrintPerWord { public static void main(String[] args) { Scanner read = new Scanner(System.in); String myString = new String(); System.out.print("Please enter any string: "); myString = read.nextLine(); int line = 0, let = 0, size

Palyndrome in Java

This code will show you if the word is Palyndrome or not. import java.util.Scanner; public class Palyndrome { public static void main(String[] args) { Scanner read = new Scanner(System.in); int ctr = 0; System.out.print("Enter any string: "); String str = read.next(); if(str.length()+1>3) { for(int x=0,y=str.length()-1;x