Posts

Java Method Program Project Easy And Simple -NowOnlyJava

Image
 Java Method Program Project Easy And Simple -NowOnlyJava.  package com.java; import java.util.Scanner; public class Method {       static int logic(int x, int y){     int z;         if(x>y){       z = (x+y)*5;     }     else{       z = (x*y)/2;     }     return z;       }   public static void main(String[] args) {     System.out.print("Enter Number a: ");   Scanner sc = new Scanner(System.in);   int a = sc.nextInt();   System.out.print("Enter Number b: ");   int b = sc.nextInt();   int c;   //Method invocation using object creation.  //Method obj = new Method();  // c = obj.logic(a, b);     c = logic(a, b);   System.out.println("The sum is: "+c);       } }

Learn Arrays In Java In English Easy And Simple! NowOnlyJava.

Image
ARRAYS Learn Arrays In Java In English Easy And Simple! NowOnlyJava. ------------------------------------------------------------------------ Hey what's going on everybody it's your bro hope you're doing well and in this video i'm going to teach you guys how arrays work in java so sit back relax and enjoy the show make sure you like comment and subscribe one like equals one prayer for the youtube algorithm all right welcome back ladies and gentlemen in this video i'm going to explain arrays an array is used to store multiple values in a single variable that is it they're really not that complicated but they can seem kind of intimidating so let's begin with a simple string variable called car and i will assign this a value of camaro what i could do is that i could store multiple values within the single variable by turning this variable into an array and these are the steps to do so next to the data type i'm going to add a set of straight brackets and the...

Simple Java Program. NowOnlyjava

Image
 Simple Java Program. NowOnlyjava Copy The Below Code And Paste in IDE To see the result. public class HideAndSeek { public static void main(String[] args) { System.out.print("Let's play hide and seek."); System.out.print(" There are some rules!"); System.out.println(" Everybody have to follow."); System.out.print("Three..." ); System.out.print("Two..."); System.out.println("One..."); System.out.println("Ready or not, here I come!"); } Hope It works For You. Any Queries Do Contact us and for recommend anything for us.  Thank You 😀

Check Number is even or odd Project in java.

Image
 Check Number is even or odd Project in java. Copy The Below Code And Paste in IDE To see the result. import java.util.*; class Test { public static void main(String[] args) { Scanner s = new Scanner(System.in); int choice = 1; while (choice == 1) { int a; System.out.println("Enter a number to check odd or even"); a = s.nextInt(); if (a % 2 == 0) { System.out.println("Your number is even"); } else { System.out.println("Your number is odd"); } System.out.println("Want to check more 1 for yes 0 for no"); choice = s.nextInt(); } System.out.println("I hope you checked all your numbers."); } } Hope It works For You. Any Queries Do Contact us and for recommend anything for us.  Thank You 😀

Percentage Calculator Project In Java Easy and Simple.

Image
  Percentage Calculator Project In Java Easy and Simple.  Copy The Below Code And Paste Into Your IdE To get The results.    package com.java; import java.util.Scanner; public class Sahil07Exercise { public static void main(String[] args) { System.out.println("SSC Board"); System.out.println("Enter 5 Subjects Marks"); System.out.print("Enter Science Marks:" ); Scanner as = new Scanner(System.in); int a = as.nextInt(); System.out.print("Enter Maths Marks: "); int b = as.nextInt(); System.out.print("Enter English: "); int c = as.nextInt(); System.out.print("Enter Marathi: "); int d = as.nextInt(); System.out.print("Enter Hindi: "); int e = as.nextInt(); System.out.print("Enter SS: "); int x = as.nextInt(); int f = a+b+c+d+e+x; float g =f*100/600; System.out.print("Percentage(%): "); System.out.println(g);     } } Hope It works For You. Any Queries Do Contact us and for recommend anything for us.  Th...