Welcome to Java Examples

Take a cup of tea and Let's Start programming

This problem is know as Clock angle problem where we need to find angle between hands of an analog clock at Example: Input: h = 12:00, m = 30.00 Output:...

//notepad import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.util.Scanner; import java.io.*; public class Notepad extends JFrame implements ActionListener { private TextArea textarea = new TextArea("",0,0,TextArea.SCROLLBARS_VERTICAL_ONLY); private MenuBar menubar...

//tic tac toe..using applet ... import java.applet.Applet; import java.awt.*; import java.awt.event.*; /** // // @author - techieRJ // **/ //<applet code=tic_tac_toe width=500 height=500></applet> public class tic_tac_toe extends Applet...

import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class calculator extends Applet implements ActionListener { Button btn1,btn2,btn3,btn4,btn5,btn6,btn7,btn8,btn9,btn0,btn_mul,btn_div,btn_min,btn_add,btn_enter,btn_decimal,btn_clr; Label lbltext; String temp1="",temp2,temp4; double temp3; boolean decimal=false,mul=false,div=false,add=false,min=false,first=true; public void init() {...