Skip to content
Programming is like sex. One mistake and you have to support it for the rest of your life.
FcukTheCode

Compare two strings lexicographically in Java

  • Post category:Java
  • Post comments:0 Comments

Write a java program to compare two strings lexicographically. Lexicographical order is nothing but the dictionary order or preferably the order…

Continue ReadingCompare two strings lexicographically in Java

Sum of array pairs equals given number in Java …FTC

  • Post category:Java
  • Post comments:0 Comments

Write a java program to find Pair of Integers in Array whose Sum is Given Number. The Number of Inputs are…

Continue ReadingSum of array pairs equals given number in Java …FTC

Mana and trail of Stones ….Java FTC

  • Post category:Java
  • Post comments:0 Comments

Mana is out on a hike with friends. She finds a trail of stones with numbers on them. She starts following…

Continue ReadingMana and trail of Stones ….Java FTC

Sum of Array elements in Java [With Ilustrat..] …FTC

  • Post category:Java
  • Post comments:0 Comments

Get array as input and display the sum of array elements as outputs. S = sum(A) returns the sum of the…

Continue ReadingSum of Array elements in Java [With Ilustrat..] …FTC

Write a Java program to detect key presses …FTC

  • Post category:Java
  • Post comments:0 Comments

If the user pressed number keys( from 0 to 9), the program will tell the number that is pressed, otherwise, program…

Continue ReadingWrite a Java program to detect key presses …FTC

Sum of diagonal of a matrix in Java …FTC

  • Post category:Java
  • Post comments:0 Comments

Write a program to accept a n X n matrix and print addition of diagonal elements of that matrix. Input: size…

Continue ReadingSum of diagonal of a matrix in Java …FTC

Asterisk (*) pattern in Java …FTC

  • Post category:Java
  • Post comments:0 Comments

Write a java program to display the following patterns. Input: 5 Output: * *** ***** ******* ********* import java.io.*; import java.util.*;…

Continue ReadingAsterisk (*) pattern in Java …FTC

Number Pattern in Java …FTC

  • Post category:Java
  • Post comments:0 Comments

Write a java program to display the following patterns. Input: 7 Output: 7 6 5 4 3 2 1 7 6…

Continue ReadingNumber Pattern in Java …FTC

Declaring Variable outside main [Java]

  • Post category:Java
  • Post comments:0 Comments

Declare a protected static variable outside the main and increment the variable inside a function which is called inside the main…

Continue ReadingDeclaring Variable outside main [Java]

Java program to check for IMEI number …FTC

  • Post category:Java
  • Post comments:0 Comments

The International Mobile Equipment Identity (IMEI) number is a unique identification or serial number that all mobile phones and smartphones have.…

Continue ReadingJava program to check for IMEI number …FTC

Decimal to Octal in Java …FTC

  • Post category:Java
  • Post comments:0 Comments

Java program to convert from decimal to octal. Input: Decimal Number: 50 Output: Octal Number: 62 import java.io.*; import java.util.*; public…

Continue ReadingDecimal to Octal in Java …FTC

Number divisible by 11 or not!! [Java] ..FTC

  • Post category:Java
  • Post comments:0 Comments

Given a number (n) , the task is to find if its divisible by 11 or not. Input:The first line of…

Continue ReadingNumber divisible by 11 or not!! [Java] ..FTC

Reverse the given number [Java] …FTC

  • Post category:Java
  • Post comments:0 Comments

Write a program to print reverse of a number of the given number. Input: 987654321 Output: 123456789 import java.io.*; import java.util.*;…

Continue ReadingReverse the given number [Java] …FTC

Get Input from User and Display [Java] Int and Float Values …FTC

  • Post category:Java
  • Post comments:0 Comments

Write a Java program to declare integer variables, float variable, get input from user and Then display their values on the…

Continue ReadingGet Input from User and Display [Java] Int and Float Values …FTC

Java program number prime or not …FTC

  • Post category:Java
  • Post comments:0 Comments

Java program to check number for prime or not. If the number is Prime print "yes" else print "no" Input: 1…

Continue ReadingJava program number prime or not …FTC

Conversion from binary to decimal in Java …FTC

  • Post category:Java
  • Post comments:0 Comments

Java Program to convert from binary to decimal number Input: 1111 //Binary Number Output: 15 //Decimal Number import java.io.*; import java.util.*;…

Continue ReadingConversion from binary to decimal in Java …FTC

Swapping two numbers by multiplication and division in Java

  • Post category:Java
  • Post comments:0 Comments

Java Program to Swap two numbers by using division and multiplication. Input: 650 350 Output: 350 650 import java.io.*; import java.util.*;…

Continue ReadingSwapping two numbers by multiplication and division in Java

Height – Foot and inches to Centimetres in Java …fcukthecode.com

  • Post category:Java
  • Post comments:0 Comments

Many people think about their height in feet and inches, even in some countries that primarily use the metric system. Write…

Continue ReadingHeight – Foot and inches to Centimetres in Java …fcukthecode.com

Concatenate Strings in Java …fcukthecode.com

  • Post category:Java
  • Post comments:0 Comments

Write a java program to print concatenated strings . You can + operator to concatenate strings and print it. Input: //…

Continue ReadingConcatenate Strings in Java …fcukthecode.com

Lowercase to Uppercase in Java …FTC

  • Post category:Java
  • Post comments:0 Comments

Write a program that asks the user's name, and then greets the user by name. Before outputting the user's name, convert…

Continue ReadingLowercase to Uppercase in Java …FTC
  • Go to the previous page
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 18
  • Go to the next page
Copyright - OceanWP Theme by OceanWP