Post Reply  Post Thread 
Newbie in Java
Author Message
vbarhoskie
Junior Member
**


Posts: 1
Group: Registered
Joined: Jul 2008
Status: Offline
Reputation: 0
Thank 0
0 was given thank in 0 posts
Post: #1
Newbie in Java

Gentlemen,

I need someone to help me in identifying whats wrong with my code? Whenever I try to compile it gives me errors?

I am new to programming and am still studying. Please help!

class ArithmeticOperations
{
int num1 = 12;//Declaring and initiallizing variables
int num2 = 5;
int a; int b; int c; int d;

public ArithmeticOperations()
{
a = num1 + num2;
b = num1 - num2;
c = num1 * num2;
d = num1 / num2;

}

public Void showData()
{
System.out.println("The sum of num1 and num2, is=");
return a;
System.out.println("The difference between num1 and num2, is=");
return b;
System.out.println("The product of num1 and num2, is=");
return c;
System.out.println("The result of dividing num1 by num2, is=");
return d;
}

public static void main(String args[])
{
ArithmeticOperations ao = new ArithmeticOperations();
ao.showData();
}

}



ADD TO DEL.ICIO.US  ADD TO DIGG  ADD TO FURL  ADD TO NEWSVINE  ADD TO NETSCAPE 
ADD TO TECHNORATI FAVORITES  Technorati ADD TO SQUIDOO  ADD TO WINDOWS LIVE  ADD TO YAHOO MYWEB  ADD TO ASK 
ADD TO REDDIT  ADD TO STUMBLEUPON  ADD TO GOOGLE   

07-17-2008 12:15 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  The Complete Java 2 Certification Study Guide: Programmer’s and Developers Exams admin 0 322 07-20-2007 07:36 PM
Last Post: admin
  SCJP Exam for J2SE 5: A Concise & Comprehensive Study Guide for Sun Certified Java admin 0 318 07-20-2007 07:33 PM
Last Post: admin
  SCJP Sun Certified Programmer for Java 5 Study Guide, Exam 310-055 admin 0 457 07-20-2007 07:31 PM
Last Post: admin
  The Sun Certified Java Developer Exam with J2SE 1.4 admin 0 259 07-20-2007 07:29 PM
Last Post: admin
  Google Web Toolkit: GWT Java Ajax Programming admin 0 255 07-20-2007 07:28 PM
Last Post: admin
  Professional Java JDK 6 Edition admin 0 753 07-20-2007 07:24 PM
Last Post: admin
  The Definitive Guide to Java Swing, Third Edition admin 0 304 07-19-2007 11:43 PM
Last Post: admin
  Beginning Java Objects: From Concepts To Code, Second Edition admin 0 298 07-19-2007 11:42 PM
Last Post: admin
  Java Programming with Oracle JDBC admin 0 381 07-19-2007 11:41 PM
Last Post: admin
  Professional Eclipse 3 for Java Developers admin 0 287 07-19-2007 11:40 PM
Last Post: admin

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: