MSK Technologies

Home
Practice Programs
Java Programs Python Programs Java Quiz
Pages
Python Java Material PLSQL Material
Search A Job

Write a Java-program to print Max Number using return type with parameterized method

  1. Home
  2. Java Programs

Write a Java-program to print Max Number using return type with parameterized method

Write a Java-program to print Max Number using return type with parameterized method

Program
class Maxnum
{
    int max(int x,int y)
    {
        
        if(x>y)
        {
            return x;
        }
        else
        {
            return y;
        }
    }
}
public class Main
{
    public static void main(String args[])
    {
        Maxnum m=new Maxnum();
        int p=m.max(10,20);
        System.out.println(p+" is Max Number");
    }
}

Output:

20 is Max Number





More Questions


104 . Write a Java-program to print Max Number using return type with parameterized method
105 . Write a Java-program to print Factorial Number using no return type with no parameterized method
106 . Write a Java-program to print Factorial Number using no return type with parameterized method
107 . Write a Java-program to print Factorial Number using return type with no parameterized method
108 . Write a Java-program to print Factorial Number using return type with parameterized method
109 . Write a Java-program to print static method
110 . Write a Java-program to print static variable
111 . Write a Java-program to using static block
112 . Write a Java-program to print addition ,substraction ,multiplication,division using oops (using single class)
113 . Write a Java-program to print addition ,substraction ,multiplication,division using oops (using multiple classes)
114 . Write a Java-program to print Max Number program using no parametarized constructor with no return type with no parametarized method


Interview Questions

Java Interview Questions

Python Interview Questions

Oracle Interview Questions

100 Most Asked Java Interview Questions and Answers

HR Interview Questions and Answers

Top 50 OOPS Interview Questions & Answers

Apply For The Job

Apply For Job

Java Material

Python Material

PLSQL Material

.Net Material

Java Practice Programs

400 Java Programs

Java Practice Programs

Write a Java program to print the odd numbers from 1 to 20

Write a Java program to convert kilometers to miles.

Write a Java program that takes five numbers as input to calculate and print the average of the numbers

Write a java Program to print odd and even numbers from an array

Write a Java program to compare two numbers

Python Practice Programs

Write a Python Program to Find LCM.

Write a Python Program to find sum of array.

Write a program to merging dictionaries

Write a Python program sort a list in descending order

Write a Python program to count number of vowels in the given string

Interview Questions

Java Interview Questions

Python Interview Questions

Oracle Interview Questions

100 Most Asked Java Interview Questions and Answers

HR Interview Questions and Answers

Top 50 OOPS Interview Questions & Answers

Java Quiz

Java Quiz - 15

Java Quiz - 8

Java Quiz - 22

Java Quiz - 7

Java Quiz - 19

Courses
Java Python PLSQL .Net ADO.Net About Us
Quick Links
Daily Use English Sentences Daily General Knowledge General Knowledge Latest Update Inventions and Inventors జనరల్ నాలెడ్జ్ General Knowledge Spoken English Spoken Hindi GK Hindi Telugu Facts Unknown Facts Psychology Facts Motivation Quotes విటమిన్ - సి,డి,ఇ,కె Android
Spiritual
రాధాకృష్ణ భగవద్గీత Motivation Quotes Slokas Talapatra Nidhi ఆధ్యాత్మిక భక్తి ప్రపంచం Sadhguru Sai Motivation Quotes గౌతమ బుద్ధుడు Bhagavad Gita Quotes
Newsletter

Dolor amet sit justo amet elitr clita ipsum elitr est.

© sateeshm, All Right Reserved. Designed By sateeshm
Home Help FQAs