Home Tutorialhelp Comment java program code

 
 

Comment

kamal
java program code,
March 5, 2009 at 7:02 PM

class exp
{
public static void main(String sr[])
{
int d;
d=Integer.ParseInt(sr[0]);
if(d=1)
{
System.out.print("SUNDAY");
}
elseif(d=2)
{
System.out.print("MONDAY");
}
elseif(d=3)
{
System.out.print("TUESDAY");
}
elseif(d=4)
{
System.out.print("WEDNESDAY");
}
elseif(d=5)
{
System.out.print("THURSDAY");
}
elseif(d=6)
{
System.out.print("FRIDAY");
}
elseif(d=7)
{
System.out.print("SATURDAY");

else
{
System.out.print("INVALID DATA");

}
}
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java Tips and Examples

GUI Tips
Java NotesGUI Tips [Beginning of list of GUI tips -- needs much more] Program structure main can be in any class, but it's often simplest.... Events and communication After the GUI is constructed, the program stops execution 

Java Tips and Examples

Java Review: Control Flow
Java Review: Control Flow Java uses the dominant imperative control flow paradigm. Other paradigms are declarative programming and data flow. Structured Programming control flow primitives within a method: Sequence 

General

Loop Control flow enhancement discussion - Java Tutorial
/implement regular program flow. I just picked up some code from another group...Loop Control flow enhancement discussion 2001-04-28 The Java Specialists... that Exception Handling is good for general Program Flow enhancement ( Loop breaking 

Java-Tutorials

Control Flow Statements in java 7
Control Flow Statements in java 7 In this section we will discuss Control Flow... Flow Statements : - In general program execution flow is from top to bottom but you can also control flow of your program with the help of control flow 

Free Magazine

Tips and Tricks
and keyboard related operation through java code for the purposes of test automation, self...Tips and Tricks        ... in Java Java provides a lot of fun while programming. This article shows you how 

Java Interview Questions

Interview Tips - Java Interview Questions
Interview Tips  Hi, I am looking for a job in java/j2ee.plz give me interview tips. i mean topics which i should be strong and how to prepare. Looking for a job 3.5yrs experience 

Swing AWT

java program code
java program code  can any one write a program (class) which will have two methods Fibonacci and Factorial, which will be a void and a return respectively. i will be glad if it can have a good display results 

Java Beginners

program code - Java Beginners
program code  Design and write a Java application that takes as input a single letter and displays the corresponding digit on the telephone..., This code will be helpful to you in solving your problem. import java.util. 

Java Beginners

Java program
Java program  How to write code in order to draw a face in java 

Java Beginners

Java program
Java program  How to write code in order to draw a face in java 

Java Beginners

code for program
code for program  hello,I am new to java and need to get the code for a program,i've been trying all sorts of code and nothing works any help would be appreciated.Below is what the program should output with the user's input 

Java Beginners

source code program - Java Beginners
source code program  I need the source code for a program that converts temperatures from celsius to fahrenheit and vice versa, as well as converting kilometers to miles and vice versa using Java "classes".  Hi 

Security Questions

java code
java code  what is the code to turn off my pc through java program 

Java Beginners

Small program code - Java Beginners
Small program code  Develop the echo server and the echo client program that display whatever is typed in the server on to the client 

Applet Questions

java program
java program  i want a applet program that accepts two input strings using tag and concatenate the strings and display it in status window. please give mi he code for this in core java 

Applet Questions

java program
java program  i want a applet program that accepts two input strings using tag and concatenate the strings and display it in status window. please give mi he code for this in core java 

Applet Questions

java program
java program  i want a applet program that accepts two input strings using tag and concatenate the strings and display it in status window. please give mi he code for this in core java 

Java Beginners

program code for this question - Java Beginners
program code for this question  QUESTION 2: Address Information..., are kept in a file. Your task: Write a Java application LookUp.java that acts as an IP lookup tool. The program reads a search phrase (which could either be an IP 

Java Tips and Examples

Summary - Control Flow
Java: Summary - Control Flow Each control statement is one logical... {}. The if else statement can be used in following ways: a) if ..else b) if .. elseif .. else c) if .. elseif .. elsif .. elsif .. else The switch statement can 

Free Magazine

Tips & Tricks
Tips & Tricks          Here are some basic implementations of java language, which you would like to know. Have a look at the given program below. Found anything unusual 

Java Beginners

java code
java code  hi any one please tell me the java code to access any link i mean which method of which class is used to open any link in java program 

Java Beginners

inheritance code program - Java Beginners
inheritance code program  class Point { private int x ; private int y; public Point (int x , int y) { this.x = x; this.y =y...: http://www.roseindia.net/java/master-java/interface.shtml Thanks. Amardeep 

Java Beginners

program code for this question - Java Beginners
program code for this question  QUESTION 1: Electricity Bill Tshubang...: Write a Java application, ProduceBills.java, that reads the name of the file.... Program should send each customer?s bill to a text file whose name is the customers?s 

Java Beginners

Java Code
Java Code  Write a java program, which creates multiple threads. Each thread performs add/delete/update operations on an ArrayList simultaneously 

JavaScript Questions

java code
java code  Write a program to find the difference between sum of the squares and the square of the sums of n numbers 

JavaScript Questions

java code
java code   Develop a program that accepts the area of a square and will calculate its perimeter 

JavaScript Questions

java code
java code  Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk and its height and computes surface area of the cylinder 

JavaScript Questions

java code
java code  Develop the program calculateCylinderVolume., which accepts radius of a cylinder's base disk and its height and computes the volume of the cylinder 

Java Beginners

Java code
Java code  Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall 

JavaScript Questions

java code
java code  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results 

PHP Tutorial

Operators; If, Else, Elseif; Loops
. In this statement, we can use if...elseif....else statement the code this statement...; elseif (condition) code to be executed if condition is true; else code... 3.9. Operators; If, Else, Elseif; Loops Conditional Statements 

Java Beginners

Java code - Java Beginners
Java code  A Java program that find out the age of person from accessing the current system Date 

Java Beginners

Java code - Java Beginners
Java code  how to make a program in java(Jbutton) if there is a combination numbers inorder to exit the program else the background color of the frame will turns red 

Java Beginners

Java Code - Java Beginners
Java Code  Write a Java Program that display an Image and Apply... the following links: http://www.roseindia.net/java/example/java/swing/graphics2D/image-effect.shtml http://www.roseindia.net/java/example/java/swing/graphics2D/other 

Java Beginners

java code
java code  Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean 

JavaScript Questions

java code
java code   Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean 

Java Beginners

Java Program
Java Program for accepting numbers from 1 - 999 and printing them in form of words  Program for accepting numbers from 1 - 999 and printing them in form of words   Java Convert Number to Words The given code accept 

JavaScript Questions

java code
java code  An old-style movie theater has a simple profit program. Each customer pays $5 per ticket. Every performance costs the theater $20, plus $.50 per attendee. Develop the program calculateTotalProfit that consumes 

Java Beginners

Java Program
Java Program  How to Write a Java program which read in a number... out in the standard output. The program should be started like this: java... to be read. In this example, the program should create three threads for reading 

Java Beginners

java program
java program  5 5 4 5 4 3 5 4 3 2 5 4 3 2 1   Here is a code that displays following pattern: 5 5 4 5 4 3 5 4 3 2 5 4 3 2 1 class Pattern{ public static void main(String args[]){ for(int i=1;i< 

Java Beginners

Java Program
Java Program  Hi, please share the code to check, if two strings are permutations of each other in java.   Here is an example that prompts the user to enter two strings in order to check whether they are permutation 

Java Beginners

java program
java program  arithmetic operation prm using interface concepts in java   Hi Friend, Try the following code: interface Operations{ public void add(int a,int b); public void subtract(int a,int b); public 

Java Beginners

Java Code - Java Beginners
Java Code  Write a java Program using Swings that displays a JDialog Box and displose it when user click on close Button on it title bar 

Java Beginners

Java code - Java Beginners
Java code   Write a Java Program using Swings that displays image on JPanel on JFrame and apply various effects to that image Like Fading,Moving,Cutting 

Java Beginners

Java code
Java code  Develop the program calculateHeight, which computes the height that a rocket reaches in a given amount of time. If the rocket accelerates at a constant rate g, it reaches a speed of g ‚?Ę t in t time units and a height 

JavaScript Questions

java code
java code  Develop a program that accepts an initial amount of money (called the principal), a simple annual interest rate, and a number of months will compute the balance at the end of that time. Assume that no additional 

JavaScript Questions

java code
java code  Develop the program calculateHeight, which computes the height that a rocket reaches in a given amount of time. If the rocket accelerates at a constant rate g, it reaches a speed of g ¬∑ t in t time units and a height 

Java Beginners

Java code
Java code  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any... the following code: import java.util.*; import java.text.*; class NumberProgram 

Java Tips and Examples

Java - The switch construct in Java
also turns the normal flow control of the program as per conditions. It works.... Full running program code is provided with the example. Here is a code of program... Java - The switch construct in Java    

JavaScript Questions

java program
java program  Problem 1 Write a javaScript program that would input Employee Name, rate per hour, No. of hours worked and will compute the daily wage... this as soon u finished this thanks   Hi Friend, Try the following code: < 

Java Beginners

java program - Java Beginners
java program  what is the program the a simple program in Java... of the triangle and then the program; a)First determines whether the 3 integers entered... the following code to solve your problem. class Triangle { public static 

Free Magazine

Tips 'n' Tricks
Tips 'n' Tricks           Download files data from many URLs This Java program... where you want. This program takes destination directory for the files to save 

Java Beginners

java program - Java Beginners
java program  hi sir, i want a simple java program to pick out the biggest in an array of integers  Hi Friend, Try the following code: import java.util.*; public class LargestNo{ public static void 

Java Beginners

Java Program - Java Beginners
Java Program  Write a java program to find out the sum of digits of a given number by the user?  Hi Friend, Try the following code: import java.util.*; public class SumOfDigits { public static void main 

Java Beginners

Java Program - Java Beginners
Java Program  Write a java program to find out the sum of a given number by the user?  Hi Friend, Try the following code: import java.util.*; public class UserInput{ public static void main(String[]args 

Java Beginners

java code
java code  int g() { System.out.println("Inside method g"); int h... program segment and explain how to correct the error?   Firstly, int type... cannot define a method inside another method. Anyways, we have modified your code 

Java Beginners

Java Code - Java Beginners
Java Code  Write a Java Program that Display a Dialog Box using JDialog using JFrame and completly dispose it as user click on close button of it on the title bar 

Java Beginners

Java code
Java code  An old-style movie theater has a simple profit program... $.50 per attendee. Develop the program calculateTotalProfit that consumes...; Hi Friend, Try the following code: import java.util.*; import 

Programming Tutorials

Dojo Tool tips
.     Here is the code of program: <html> <...Dojo Tool tips        ... tips and how to developed it in dojo.  Tool tips :  This is a GUI 

Programming Tutorials

Dojo Tool tips
.     Here is the code of program: <html> <...Dojo Tool tips        ... tips and how to developed it in dojo.  Tool tips :  This is a GUI 

JavaScript Questions

java code
java code  Utopias tax accountants always use programs that compute income taxes even though the tax rate is a solid, never-changing 15%. Define the program calculateTax which determines the tax on the gross pay. Define 

JDBC Questions

jdbc connection to java program code - JDBC
jdbc connection to java program code  i want a simple java program that which communicates with oracle database like creating table,insert values and update records in database and show in program output? please take a simple 

Java Beginners

java code - Java Beginners
java code  Hi !I have already built a program for chatting (with GUI's ),but it works only with single client and single server.Can you please send me a java code for chatting which works with multiple clients an single server 

Free Magazine

Tips and Tricks
Tips and Tricks        ... in the form of a PDF document using Servlet. This program uses iText, which is a java library containing classes to generate documents in PDF, XML, HTML, and RTF 

Java Beginners

Java Program - Java Beginners
Java Program  Hi! pls. help me to solve this problem.........Allow... for the change.  Hi friend, Please give full details and source code to solve the problem For more information,Tutorials and examples on Java visit 

Java Beginners

Java Program - Java Beginners
Java Program  A Java Program that input 10 Numbers and find out the smallest amoung them without using Array.  Hi Friend, Try the following code: import java.util.*; public class SmallestNumber { public 

Java Beginners

Java Program - Java Beginners
Java Program  Define an exception called ‚??NoMatchException‚?? that is thrown when a string is not equal to ‚??Symbiosis‚??. Write a Java program that uses this exception.  Hi Friend, Try the following code 

Java Beginners

Java Program - Java Beginners
Java Program  Write a Java program that calculates and prints...,R should be accepted as command line input as below. e.g. java SimpleInterest 5 10 15  Hi Friend, Try the following code: import java.io. 

Java Beginners

java program - Java Beginners
java program  sir,i'm ask to develop a program on below question. Design a Vehicle class hierarchy in java.write a test program to demonstrate polymorphism using advanced java concepts and dynamic binding.  Hi Friend 

Java Beginners

Java Program - Java Beginners
Java Program  Write a program to print the following output using the for loop. 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5  Hi Friend, Try the following code: class pyramid{ public static void main(String[] args){ int i 

Java Beginners

java program - Java Beginners
java program  write a program that asks the user for a starting value and an ending value and then writes all the integers (inclusive) between those two value.  Hi Friend, Try the following code: import java.util. 

Java Beginners

Java Program - Java Beginners
Java Program  Code an application called Week Four Program that provides 3 menu options: 1: List Entries 2: Add Entries 3: Exit Prompt... the third menu option, the application exits. Program should be coded 

Java-Tutorials

How to run a Java program in CMD
discussed how to write and run Java program in CMD. Tips to run Java program... a notepad or any other editor and write a small program in Java as given below... command at your command prompt. set path=%path%;C:\Program Files\Java\jdk1.5.0_09 

Java Beginners

java Program - Java Beginners
java Program  1. Write a java program to accept 10 numbers in an array and compute the sum of the square of these number. 2. Wrtie a java program... the following code: 1)Compute.java: import java.util.*; class Compute { public 

Java Beginners

a java program... - Java Beginners
a java program...  write a program to check that a number... of the number. write a program to print the following pattern 55555 54444 54333 54322 54321  Hi friend, Code to check the number 

Java Beginners

java program - Java Beginners
java program  write a program in java to print the following pattern? 1 2 3 4 3 4 5 4 3 4 5 6 7 6 5 4 5 6 7 8 6 5 4 3  Hi Friend, Try the following code: class ShowPattern{ public static void main(String 

Java Beginners

a java program - Java Beginners
a java program  well sir, i just wanna ask you something regarding that if the question say .....write a program to check whether a number is even... about the second line... i have made my program but not able to click 

Java Beginners

Java Program - Java Beginners
Java Program  Code an application using a GUI called Week Four Program that provides 3 menu options: 1: List Entries 2: Add Entries 3: Exit Prompt for an option If the user selects the first menu option 

Java Beginners

Java Program - Java Beginners
Java Program  Write a program to find the Factorial of a number using Recursion. Factorial can be defined as Factorial(n) = 1 * 2 * 3 ‚?¶.* (n-1) * n.  Hi Friend, Try the following code: class 

Java Beginners

Java Program - Java Beginners
Java Program  Write a program that prints prime numbers between 1 to n. Number n should be acepted as command line input.  Hi Friend, Try the following code: import java.util.*; class PrimeNumbers{ public 

Java Beginners

Java Program - Java Beginners
Java Program  Write a program to compute sum of digits of a given number. (Hint: Separate digits one by one from the number and then add)  Hi Friend, Try the following code: import java.util.*; public class 

Java Beginners

java program - Java Beginners
java program  sir,i'm ask to develop a program on below question. Design a Vehicle class hierarchy in java.write a test program to demonstrate polymorphism.  Hi Friend, Try the following code: class Vehicle 

Java Beginners

java code - Java Beginners
java code  PROGRAM FOR RIGHT ALIGNMENT i.e INPUT: Enter any sentence: "This is JAVA" (which is displaying on the left side in the console i.e on cmd prompt) OUTPUT: "This is JAVA" (should 

Java Beginners

Java Program - Java Beginners
Java Program  Write a Java program that accepts the radius of a circle and displays the options as follows : 1. find diameter of a cicle.(2* radius... code: import java.util.*; public class Find{ static double pi=3.14 

Java Beginners

Program to find no of metrics in a file ----- Java code
Program to find no of metrics in a file ----- Java code  Hi Friends, I got a task to calculate the metrics of a program, like to find the no of SELECT and INSERT statement is a program. With that I have to even calculate 

Java Beginners

java program - Java Beginners
java program  I have to make two radio buttons where one to show and one for clear.when u ser choose show button a fibonacci series will appear... jsp code: function show(){ document.getElementById('x 

Java Beginners

JAVA PROGRAM - Java Beginners
JAVA PROGRAM  TO FIND OUT MINIMUM AND MAXIMUM NUMBERS IN AN ARRAY  Hi Friend, Try the following code: public class Find{ public static void main(String[] args) { int []num={100,20,152,24,456,651,258,35 

Java Beginners

java program - Java Beginners
java program  sir,i'm asked to write a program in java on below question. Design a java interface for ADT stack.Develop two different class..., Try the following code: import java.lang.*; import java.io.*; import 

Java Beginners

java program - Java Beginners
java program  program to get an output i.e., is: INPUT...: ONE HUNDRED AND TWENTY THREE  Hi friend, Code to Convert Number...)); } } For more information on java visit to : http://www.roseindia.net/java/ Thanks 

Java Beginners

Java code - Java Beginners
Java code  Java program to calculate simple interest using the concept of constructor and method overriding  Hi Friend, Try the following code: class Principal { double p; Principal(double p) { this.p=p 

Java Beginners

Java code - Java Beginners
Java code  Java program to sort 'n' numbers using array  Hi Friend, Try the following code: public class SortArrayWithoutUSingMethod{ public static void sortArray(int array[], int len){ for (int i = 1; i 

Java Beginners

java program - Java Beginners
java program  "Helo man&sir can you share or gave me a java code hope its ok?" a. Write a definition of the method ONE so that it returns the sum... A JAVA CODE.THANKS  Hi friend, Having some doubts on Your 

Java Beginners

Java code - Java Beginners
Java code  Write a program to download a website from a given URL. It must download all the pages from that website. It should take the depth of retrieval from the user input. All the files/pages must be stored in a folder 

Java Beginners

Java Program - Java Beginners
Java Program  Hi, I'm have complications with this program. I keep getting errors and my coding is off. Can you help me? Write a program called...: Have your program accept the user input in two text fields. When a button 

Java Beginners

Java Program - Java Beginners
Java Program  Define a class called fruit with the following... the attributes. Write a program that creates 2 objects of fruit class and display their attributes.  Hi Friend, Try the following code: import 

Java Beginners

JAVA PROGRAM - Java Beginners
JAVA PROGRAM  write a program to find the largest word from given sentence ?(WITHOUT USING tokenizer AND ARRAY) for example- input-- ram... the following code: class LongestWord{ public static String compare(String st1 

Java Beginners

Java Program - Java Beginners
Java Program  Write a program that detects successive repeated occurrence of a letter in a word. For example, in the word ‚??explanation‚?? letter ‚... to display the repeated character in the word,go through the following code: import 

Java Beginners

Java Program - Java Beginners
Java Program  The numbers in the following sequence are called... a program using do‚?¶..while loop to calculate and print the first m Fibonacci numbers... of preceding two numbers.)  Hi Friend, Try the following code 

Java Beginners

java code - Java Beginners
java code  write a program for immutable class  Hi Friend, Try the following code: final class ImmutableClass{ private final String product; private final double price; public ImmutableClass(String 

Java Beginners

java program - Java Beginners
java program  FLAMES PROGRAM  Hi Friend, Try the following code: import java.util.*; public class FlamesProgram{ static String name1 = ""; static String name2 = ""; public void setNames( String name1 

Advertisements Advertisements
 

 

 

DMCA.com