Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

120 Program to count number of white space character in character stream in Java.

Code: /* Program to count number of whitespace character in character stream. */ import java.io.*; class CountDemo { public s...
Read More

119 Program to demonstrate BufferedOutputStream in Java

Code: /* Program to demonstrate BufferedOutputStream */ import java.io.*; class BufferedODemo { public static void main(Strin...
Read More

118 Program to demonstrate BufferedInputStream in Java

Code: /* Program to demonstrate BufferedInputStream */ import java.io.*; class BufferedIDemo { public static void main(String...
Read More

117 Program to demonstrate ByteArrayOutputStream in Java

Code: /* Program to demonstrate ByteArrayOutputStream in Java */ import java.io.*; class ByteOutputDemo { public static void ma...
Read More

116 Program to demonstrate ByteArrayInputStream in Java

Code: /* Program to demonstrate ByteArrayInputStream in Java */ import java.io.*; class ByteDemo { public static void main(Stri...
Read More

115 Program to print every nth character from the file in Java

Code: /* Program that reads a text file and prints every nth character from the file. 'n' should be passed as a command lin...
Read More

114 Program to copy from one file to another file in Java

Code: /* Program to copy data from one file to other */ import java.io.*; class CopyDemo { public static void main(String args[]) t...
Read More

113 Program to write data into File in Java

Code: import java.io.*; class WritingDemo { public static void main(String args[]) throws FileNotFoundException , IOException { ...
Read More

112 Program to read data from file in Java

Code: import java.io.*; class FISDemo {  public static void main(String args[]) throws IOException,FileNotFoundException  {   ...
Read More

111 Program to draw and fill Polygon in Java

Code: /* Program to draw and fill Polygon */ import java.awt.*; import java.applet.*; public class Polygon extends Applet { pub...
Read More

110 Program to draw and fill Arc in Java

Code: /* Program to Draw Arcs in Java */ import java.applet.*; import java.awt.*; public class Arc extends Applet { public void ...
Read More

109 Program to draw Circle in Java

Code: import java.applet.*; import java.awt.*; public class Circle extends Applet { public void paint( Graphics g ) { g.setCo...
Read More

107 ActionListner in Applet in Java

Code: import java.applet.*; import java.awt.*; import java.awt.event.*;  public class ActionButton extends Applet implements ActionL...
Read More

106 How to change font size of Applet in Java

Code: import java.applet.*; import java.awt.*; public class ActionButton extends Applet  { Button b ; public void init() ...
Read More

78 Program on Nested Try, Catch Finally Blocks in Java ?

Code: class Demo { public static void main( String args[] ) { try { System.out.println(" outer try block "); ...
Read More

105 Program to draw rectangle and fill color in rectangle in Applet in Java

Code: import java.awt.*; import java.applet.*; /* <applet code="First" height=300 width=300> </applet> */ ...
Read More

104 Program to draw triangle in Applet in Java

Code: import java.awt.*; import java.applet.*; /* <applet code="First" height=300 width=300> </applet> */ ...
Read More

103 Add Control TextField and Button on Applet in Java

Code: import java.util.*; import java.applet.*; import java.awt.*; public class Control extends Applet { TextField t1; Button b...
Read More