Skip to main content

Posts

Showing posts with the label viral things

Circle Square and Triangle in Java for GUI

Java Code of Shapes for Graphical User Interface: For Circle: import java.awt.*; import java.awt.geom.*; /**  * A circle that can be manipulated and that draws itself on a canvas.  *   * @author  Michael Kšlling and David J. Barnes  * @version 2011.07.31  */ public class Circle {     private int diameter;     private int xPosition;     private int yPosition;     private String color;     private boolean isVisible;          /**      * Create a new circle at default position with default color.      */     public Circle()     {         diameter = 68;         xPosition = 230;         yPosition = 90;         color = "blue";     }     /**      * Make...

Program to write Date in Java

DATE PROGRAM Date Class: public class Date { private int month; private int year; private int day; public int getMonth() { return month; } public void setMonth(int month) { this.month = month; } public int getYear() { return year; } public void setYear(int year) { this.year = year; } public int getDay() { return day; } public void setDay(int day) { this.day = day; } public void displayDate() { System.out.print(getMonth()+ "/" +getDay()+ "/" +getYear() ) ; } } Date Test Class: import java.util.Scanner; public class DateTest { public static void main (String args[]) { Scanner in=new Scanner(System.in); System.out.println("Enter the day"); int d=in.nextInt(); System.out.println("Enter the month "); int m=in.nextInt(); System.out.println("Enter the year "); int y=in.nextInt(); Date date=new Date(); date.setDay(d); date.setMonth(m); date...

Youtube Channel

The New Channel is up TECH DESK

Difference between urdu and english syntax

Urdu is going to be end by the use of English words Today the English language is considered to be the very standard language to talk because we think that by using English words over available Urdu words we look to be educated enough but this is just a mindset of our minds to become over smart by using more English vocabulary more than Urdu because due to, that this is an international language may be. Well, Urdu, a South Asian language spoken by anywhere between 100 — 125 million people in Pakistan and India, and one of Pakistan’s two official languages. Urdu is traditionally written in a Perso-Arabic script called   Nastalik and the other one is naqash . Needless to say, the language is in a crisis. Specifically, it is the lack of interest in its preservation which is disturbing. People want to connect with the people in their ease. May be that’s why the Pakistani writers use English words more in their writing, want to be make theirs writings more attractive as c...