q

q

how to add 2 numbers in java

View Answers

January 28, 2011 at 10:40 AM

Hi,

Try this:

class Test{
    public int add(int a,int b){
        return a+b;
    }
    public static void main(String []args){
        Calculation cal=new Calculation();
        int add=cal.add(5,10);
        System.out.println(add);
        }
}

Thanks









Related Tutorials/Questions & Answers:
java q?
java q?  how to get the average and rank of 1 million student records using threads
sql q's
sql q's  Find out the job that was filled in the first half of 1983 and same job that was filled during the same period on 1984? Display... before 15th of the month? For the above Q's please respond quickly all the queries
Advertisements
q in java
q in java  Designed a program that allows the user to enter a name Then the program prints the characters of a-z and after each letter means... f 0 g 0 h 1 i 0 j 1 k 0 l 0 m 0 n 1 o 1 p 0 q 0 r 0 . . . . z 0   up
q
ModuleNotFoundError: No module named 'q'
ModuleNotFoundError: No module named 'q'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'q' How to remove the ModuleNotFoundError: No module named 'q' error
ModuleNotFoundError: No module named 'q'
ModuleNotFoundError: No module named 'q'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'q' How to remove the ModuleNotFoundError: No module named 'q' error
ModuleNotFoundError: No module named 'q'
ModuleNotFoundError: No module named 'q'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'q' How to remove the ModuleNotFoundError: No module named 'q' error
HTML - Q (quotation) tag.
HTML - Q (quotation) tag. Description : It generates a quotation over the text. Code : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional
ModuleNotFoundError: No module named 'kw-q'
ModuleNotFoundError: No module named 'kw-q'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'kw-q' How to remove the ModuleNotFoundError: No module named 'kw-q' error
ModuleNotFoundError: No module named 'kw-q'
ModuleNotFoundError: No module named 'kw-q'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'kw-q' How to remove the ModuleNotFoundError: No module named 'kw-q' error
ModuleNotFoundError: No module named 'punch-q'
ModuleNotFoundError: No module named 'punch-q'  Hi, My Python... 'punch-q' How to remove the ModuleNotFoundError: No module named 'punch-q... to install padas library. You can install punch-q python with following command
ModuleNotFoundError: No module named 'pygments-q'
ModuleNotFoundError: No module named 'pygments-q'  Hi, My Python... 'pygments-q' How to remove the ModuleNotFoundError: No module named 'pygments-q' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'q-a-dependencies'
ModuleNotFoundError: No module named 'q-a-dependencies'  Hi, My... named 'q-a-dependencies' How to remove the ModuleNotFoundError: No module named 'q-a-dependencies' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'q-a-dependencies'
ModuleNotFoundError: No module named 'q-a-dependencies'  Hi, My... named 'q-a-dependencies' How to remove the ModuleNotFoundError: No module named 'q-a-dependencies' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'q-ctrl'
ModuleNotFoundError: No module named 'q-ctrl'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'q-ctrl' How to remove the ModuleNotFoundError: No module named 'q-ctrl'
ModuleNotFoundError: No module named 'q-gomoku'
ModuleNotFoundError: No module named 'q-gomoku'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'q-gomoku' How to remove the ModuleNotFoundError: No module named 'q-gomoku
ModuleNotFoundError: No module named 'q-stdev'
ModuleNotFoundError: No module named 'q-stdev'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'q-stdev' How to remove the ModuleNotFoundError: No module named 'q-stdev
ModuleNotFoundError: No module named 'q-stdev'
ModuleNotFoundError: No module named 'q-stdev'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'q-stdev' How to remove the ModuleNotFoundError: No module named 'q-stdev
ModuleNotFoundError: No module named 'renom-q'
ModuleNotFoundError: No module named 'renom-q'  Hi, My Python... 'renom-q' How to remove the ModuleNotFoundError: No module named 'renom-q... to install padas library. You can install renom-q python with following command
ModuleNotFoundError: No module named 'util--q'
ModuleNotFoundError: No module named 'util--q'  Hi, My Python...--q' How to remove the ModuleNotFoundError: No module named 'util--q... to install padas library. You can install util--q python with following command
ModuleNotFoundError: No module named 'django-q'
ModuleNotFoundError: No module named 'django-q'  Hi, My Python... 'django-q' How to remove the ModuleNotFoundError: No module named 'django-q... to install padas library. You can install django-q python with following
Please help with this Q ASAP
Please help with this Q ASAP  The University wants to make a basic graphical display to show how many people received different grades for a piece of work on a module. You are required to write a program in Java that achieves
ModuleNotFoundError: No module named 'django-q-rollbar'
ModuleNotFoundError: No module named 'django-q-rollbar'  Hi, My... named 'django-q-rollbar' How to remove the ModuleNotFoundError: No module named 'django-q-rollbar' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'django-toosimple-q'
ModuleNotFoundError: No module named 'django-toosimple-q'  Hi, My... named 'django-toosimple-q' How to remove the ModuleNotFoundError: No module named 'django-toosimple-q' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'livingbio-django-q'
ModuleNotFoundError: No module named 'livingbio-django-q'  Hi, My... named 'livingbio-django-q' How to remove the ModuleNotFoundError: No module named 'livingbio-django-q' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'mxmul-pkg-q'
ModuleNotFoundError: No module named 'mxmul-pkg-q'  Hi, My Python... 'mxmul-pkg-q' How to remove the ModuleNotFoundError: No module named 'mxmul-pkg-q' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'django-q-email'
ModuleNotFoundError: No module named 'django-q-email'  Hi, My... named 'django-q-email' How to remove the ModuleNotFoundError: No module named 'django-q-email' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-q-rollbar'
ModuleNotFoundError: No module named 'django-q-rollbar'  Hi, My... named 'django-q-rollbar' How to remove the ModuleNotFoundError: No module named 'django-q-rollbar' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'django-q-sentry'
ModuleNotFoundError: No module named 'django-q-sentry'  Hi, My... named 'django-q-sentry' How to remove the ModuleNotFoundError: No module named 'django-q-sentry' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-tenant-schemas-q'
ModuleNotFoundError: No module named 'django-tenant-schemas-q'  Hi...: No module named 'django-tenant-schemas-q' How to remove the ModuleNotFoundError: No module named 'django-tenant-schemas-q' error? Thanks   
ModuleNotFoundError: No module named 'django-toosimple-q'
ModuleNotFoundError: No module named 'django-toosimple-q'  Hi, My... named 'django-toosimple-q' How to remove the ModuleNotFoundError: No module named 'django-toosimple-q' error? Thanks   Hi, In your
Maven Repository/Dependency: org.webjars.npm | q
Maven Repository/Dependency of Group ID org.webjars.npm and Artifact ID q. Latest version of org.webjars.npm:q dependencies. # Version Release Date 1 0.9.7 18 Mar 2021
Maven Repository/Dependency: org.webjars.npm | q
Maven Repository/Dependency of Group ID org.webjars.npm and Artifact ID q. Latest version of org.webjars.npm:q dependencies. # Version Release Date 1 0.9.7 18 Mar 2021
ModuleNotFoundError: No module named 'Simple-Q-A-App-using-Python-Django'
ModuleNotFoundError: No module named 'Simple-Q-A-App-using-Python-Django' ...: ModuleNotFoundError: No module named 'Simple-Q-A-App-using-Python-Django' How to remove the ModuleNotFoundError: No module named 'Simple-Q-A-App-using-Python-Django
Maven dependency for org.webjars.npm - q version 0.9.7 is released. Learn to use q version 0.9.7 in Maven based Java projects
Maven dependency for  org.webjars.npm  - Version 0.9.7 of q released The developers of   org.webjars.npm - q project have released...; org.webjars.npm - q library is 0.9.7. Developer can use this version
q - JSP-Servlet
Please help with this Q
Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java  Q, 12 WAP to calculate addition of two distances in feets and inches using objects as functions arguments in java
Q - Java Terms
Q - Java Terms       Java Quartz Framework Quartz is an open source job scheduler.  It provides powerful mechanisms for job scheduling. It can
Jakarta Struts Interview Questions
;    Q: What is Jakarta Struts Framework... applications with Java. Q: What is ActionServlet? A: The class... for handling all the requests.    Q: How you will make available any
java - Java Beginners
example.  class q { int a,b; q() { a=0;b=0; } q(int x) { a=x; b=x; } q(int x,int y) { a=x; b=y; } public... { public static void main (String[] args) { q q1=new q(); q1.print(); q
spring 15/03/14
spring 15/03/14  Q) What are the various action performed when an application context is created? Q) Why spring is lightweight? Q) What is nested bean? Why it is useful
view.jsp
view.jsp  Q:view data from database
JAVA Write code which converts propositional expressions into clauses using the INOA rules
<=> q is written as imp p q. Typical dialog should be this, where I have...: and p q Clauses are: p q Enter wff: imp p and q r Clauses are: or not p q or not p r Turn in: ΓΆβ?¬ΒΆ Printout of your code. ΓΆβ?¬ΒΆ Test
array
array  WAP in java to store 6 element in array P and 4 element in array Q. Produce the third arra y R containing all element from p & q
mp3 player in c# GUI - Framework
mp3 player in c# GUI  Q. I WANT TO CREATE A MP3 PLAYER IN C# WITH SOUND CONTROL AND PROGRESS BAR
hibernate 15/03/2014
hibernate 15/03/2014  Q )in second level cache which type of date we will store in database
core java 15/03/14
core java 15/03/14  Q )how to make arraylist as reads only
Write a java application program........?
Write a java application program........?  Welcome every One : I have Q in Java? Q : Write a java application program that reads 20 integer numbers input by the user and prints how many numbers > 100 and how many numbers
CORE JAVA
CORE JAVA  Q)How to sort a Hash Table, if you pass an Employee Class Object in that First Name, Last Name, Middle Name based on last name how you sorting the Employee Class? Q)How to display the list variables in reverse

Ads