Skip to main content

Posts

Showing posts with the label coding

A Series on "JAVA CODING CHALLENGE" #2 Palindrome Check for String and Number both

Problem 2 :  Subscribe Please :   click here              Subscribe Please :   click here Write a program to check whether a String or Number is Palindrome or Not . Example : String : "madam" is Palindrome and "mad" is not                    Number : 121212 is Palindrome but 123 is not .  Subscribe Please :   click here                       Subscribe Please :   click here Approach :   Get the number to check for palindrome Hold the number in temporary variable Reverse the number Compare the temporary number with reversed number If both numbers are same, print "palindrome number" Else print "not palindrome number" Code :  import java . util .*; public class Palindrome {     public static void main ( String [] args ) {         Scanner sc = new Scanner ( System . in )...

A Series on "JAVA CODING CHALLENGE" #1 Reverse a Number

 Problem 1 :  Subscribe Please :   click here                 Subscribe Please :   click here Write a program to reverse a number . Example : if a number is 12345 the it's output will be 54321 .  Approach : Taking a integer value from user and applying the logic and print the output .  Subscribe Please :   click here              Subscribe Please :   click here Code : import java . util . Scanner ; public class Reverse {     public static void main ( String [] args ) {         Scanner sc = new Scanner ( System . in );         System . out . println ( "Enter a number : " );         int num = sc . nextInt ();         System . out . println ( "Reverse of Number : " );         while ( num != 0 ){             int d = num % 1...

TCS IPA previous year quistion ( 35 marks ) , Quistion , Input , output

 Problem Statement Video Link :    https://youtu.be/XCBvfJAo908 Create a class TravelAgencies with below attributes: regNo – int agencyName – String pakageType – String price – int flightFacility – boolean Write getters, setters for the above attributes . Create constructor which takes parameter in the above sequence. Create class Solution with main method. Implement two static methods – findAgencyWithHighestPackagePrice and agencyDetailsforGivenIdAndType in Solution class. findAgencyWithHighestPackagePrice method: This method will take array of TravelAgencies objects as an input parameter and return the highest package price from the given array of objects. agencyDetailsForGivenldAndType method: This method will take three input parameters -array of TravelAgencies objects, int parameter regNo and String parameter packageType. The method will return the TravelAgencies object based on below conditions. FlightFacility should be available. The input parameters(regNo and pack...

Top 5 Programming Language in 2021 ( for beginners )

Top 5 Programming Languages Every Programmer Should Learn  Hello friends , in our previous blog , we have seen classification of programming langauge . Please go through once . Now my dear friends , If you a beginner student in computer feild and want to learn programming languages and if you are confused then no need to worry friend , you are at write place. No doubt there are a lot of hot and crowded opportunities to a beautiful carrer in this feild  .So in this blog you will see top 5 programming languages name which you should learn as a beginner to aquire some coding experiences , to start your carrer  as a developer , software engineer etc....  1.  Python Programming Language :-   Python language is on the top in my list because it is the easiest langauge which you can learn and start as you first programming langauge .  Important features of this language - Pyhton is fast  Easy to use  Easy to understand  Not lenthy code  alm...