Preview

java

Satisfactory Essays
Open Document
Open Document
571 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
java
public class Employee
{
private int empNum; public int getEmpNum() { return empNum; } public void setEmpNum(int emp) { empNum=emp; }
}
public class TwoEmp
{
public static void main(String[]args) { Employee clerk = new Employee(); Employee driver= new driver(); clerk.setEmpNum(345); driver.setEmpNum(456); System.out.println("The clerk's number is" + clerk.getEmpNum() + " and the friver's number is " + driver.getEmpNum()); } } public class Numbers
{
public static void main(string[]args) { number1= 10; number2= 20; sum(number1, number2); different( number1, number2); } public static void sum(int no11 , int no22) { int plusnumber, plusnumber2; plusnumber =int no11 + int no22; plusnumber2 = int no22 + int no11; System.out.println("Sum Number= " + plusnumber + "!"); System.out.println("Sum Number= " + plusnumber + "!"); } public static void different(int nu 111 , int nu 222) { int minusnumber; int minusnumber2; minusnumber = int nu 222 - int nu 111; minusnumber2= int nu 111 - int nu 222; System.out.println("Minus number = " + minusnumber + "!"); System.out.println("Minus number = " + minusnumber2 + "!");

} }public class Numbers
{
public static void main(string[]args) { number1= 10; number2= 20; sum(number1, number2); different( number1, number2); } public static void sum(int no11 , int no22) { int plusnumber, plusnumber2; plusnumber =int no11 + int no22; plusnumber2 = int no22 + int no11; System.out.println("Sum Number= " + plusnumber + "!"); System.out.println("Sum Number= " + plusnumber + "!"); } public static void different(int nu 111 , int nu 222) { int minusnumber; int

You May Also Find These Documents Helpful

  • Good Essays

    PRG/420 Week 3

    • 1025 Words
    • 5 Pages

    /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package commission2; import java.lang. *; import java.text. DecimalFormat; import java.util.…

    • 1025 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Coding

    • 335 Words
    • 2 Pages

    of any impingements. The camera was then removed from the subacromial space. The area was then infiltrated with Marcaine. The posterior portal was then closed with absorbable sutures and Steri-Strips, and a Mepore dressing was placed on it. The arm was then placed in a sling; the patient awakened and was placed on her hospital bed and taken to the recovery room in good…

    • 335 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Step 2: Provide vehicle description like make, model, vehicle identification number, State, and license plate number in the space provided for the same. Then enter the name of the state on the next line.…

    • 483 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Java

    • 5076 Words
    • 21 Pages

    Explanation: B) Programs are classified as software to differentiate them from the mechanisms of the computer (hardware). Storage and the processor are two forms of hardware while input is the information that the program processes.…

    • 5076 Words
    • 21 Pages
    Good Essays
  • Good Essays

    Programming

    • 3038 Words
    • 13 Pages

    2. Each of the flowchart segments in Figure 3-35 is unstructured. Redraw each flowchart segment so that it does the same thing but is structured.…

    • 3038 Words
    • 13 Pages
    Good Essays
  • Good Essays

    Java

    • 490 Words
    • 3 Pages

    Write a Java program to demonstrate using bitmaps and bitwise operators to sort and remove duplicates from a file of random phone numbers. Do not confuse the term bitmap used for compressing data into smaller spaces with the bitmap that has come to mean a graphic image.…

    • 490 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Java

    • 827 Words
    • 4 Pages

    9. The withholding tax on a weekly salary (let us assume) is computed as follows: 14% of the difference between a person's gross pay and $13 times the number of dependents he or she claims. Read the values for the gross pay and the number of dependents; print the withholding tax.…

    • 827 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    programiing

    • 923 Words
    • 4 Pages

    1: Write a program that creates an array with 26 elements and stores the 26 lowercase letters in it. Also have it show the array contents.…

    • 923 Words
    • 4 Pages
    Satisfactory Essays
  • Better Essays

    the java

    • 4105 Words
    • 18 Pages

    Explanation: E) The "flow of control" describes the order of execution of instructions. It defaults to being linear (or sequential) but is altered by using control statements like conditionals and loops.…

    • 4105 Words
    • 18 Pages
    Better Essays
  • Good Essays

    Key Words in Java

    • 888 Words
    • 4 Pages

    Part of the Java For Dummies Cheat Sheet The 50 Java keywords have specific meanings within the language, so you can’t use the keywords in this table for anything other than their function within Java. And, you can't make up new meanings for the words false, null, and true, either. But for technical reasons, those three words aren't called keywords. Whatever!…

    • 888 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Copyright 1999 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun Logo, Solstice, Java, JavaBeans, JDK, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and Sun Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements. RESTRICTED RIGHTS: Use, duplication, or disclosure by the U.S. Government is subject to restrictions of FAR 52.227-14(g) (2)(6/87) and FAR 52.227-19(6/87), or DFAR 252.227-7015 (b)(6/95) and DFAR…

    • 6064 Words
    • 25 Pages
    Good Essays
  • Satisfactory Essays

    Thesis on java

    • 314 Words
    • 2 Pages

    This class consists of static utility methods for operating on objects. These utilities include null-safe or null-tolerant methods for computing the hash code of an object, returning a string for an object, and comparing two objects.…

    • 314 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Java Code

    • 511 Words
    • 3 Pages

    Dim sizepizza, crust, drinks, tops1, tops2, tops3, tops4, tops5, tops6, pricepizza, pricetops, pricedrink, totprice As Single…

    • 511 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Programming Languages

    • 916 Words
    • 4 Pages

    A high-level programming language developed by Dennis Ritchie at Bell Labs in the mid 1970s. Although originally designed as a systems programming language, C has proved to be a powerful and flexible language that can be used for a variety of applications, from business programs to engineering. C is particularly a popular language for personal computer programmers because it is relatively small - it requires less memory than other languages.…

    • 916 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    i.e. you can’t run a program written in a Sun Microsystem computer on an Dell with an…

    • 1485 Words
    • 11 Pages
    Powerful Essays

Related Topics