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 no parameterized method

  1. Home
  2. Java Programs

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

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

Program
class Maxnum
{
    int max()
    {
        int x=10,y=20;
        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();
        System.out.println(p+" is Max Number");
    }
}

Output:

20 is Max Number





More Questions


103 . Write a Java-program to print Max Number using return type with no parameterized method
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)


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 convert a decimal number to binary numbers

Write a java Program to print N prime numbers and find sum and average

Write a Java program to display the system time

Write a Java program to print the sum, multiply, subtract, divide and remainder of two numbers

Write a java Program to check given matrix is null matrix

Python Practice Programs

Write a Python program to check whether a character is an alphabet or not

Write a Python Program to Check Armstrong Number?

Write a program to merging dictionaries

Write a Python program to convert Celsius to Fahrenheit.

Write a python program to Find Index Using Enumerate

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 - 14

Java Quiz - 9

Java Quiz - 22

Java Quiz - 18

Java Quiz - 11

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