## Posts

Showing posts from July, 2011

### Surface area of the tetrahedron in java

What is a Tetrahedron?

### Compute the area and the circumference of the triangle in java

Source code

import java.util.*; import java.lang.Math; public class Triangle{ double s1,s2,s3; Triangle(){

### Calculate age in java using JFrame

Java version of the   Age problem  is given below:  /** * To change this template, choose Tools | Templates * and open the template in the editor. */ package age; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * * @author ACHCHUTHAN */ public class age extends JFrame implements ActionListener {

### Calculate yesterday and tomorrow date in any year in java

Java version of the  this problem is given below :
/** * To change this template, choose Tools | Templates * and open the template in the editor. */ package age; import java.util.Scanner; /** * * @author ACHCHUTHAN */ public class date {

### Sorting a two dimensional matrix in java

Sorting  matrix
class Sort_Matrix{ public static void main (String args[]){ int [][] M ={ {1,2,3,4},{2,3,4,5}, {5,6,7,8},{6,7,8,5},{3,7,9,3} }; for(int r=0;r<5;r++){ for(int c=0;c<4;c++){ System.out.print(M[r][c]+"\t "); } System.out.println(); }