Coder Social home page Coder Social logo

java-string-operations's Introduction

Java-Program-Practice

Basic Java String Programs #Sr.No. - Question

  1. Write a JAVA program to reverse the given String S. Perform the reversal operation if and only if the string S is equivalent to S1 are equal. (Perform case-sensitive comparison). If the strings are not equal print “Reverse Not Supported”. Example: String S = “Hari”, S1 = “Wipro”, output should be “Reverse Not Supported”.

  2. Write a JAVA program to count the total upper-case and lower-case characters of a String T. After counting, print them if and only if the count is not equal. If the count is equal, print “Equally Distributed”.

  3. Create a JAVA program to split the strings based on the white-spaces, after the split operation, print the string with the smallest length.

  4. Create a JAVA program to split the strings based on white-spaces, after the split operation, print all the strings in the dictionary order.

  5. Toggle the strings using JAVA. Toggling is the process of converting the uppercase characters to lower case and vice versa.

  6. Create a JAVA program to rotate the string by clock-wise direction if the length is even and to rotate the string to the anti-clockwise direction if the length is odd. Perform one rotation at any case.

  7. Create a JAVA program to merge two given strings S1 and S2. Perform merge operation by taking single character from each string. Example: If the string S1 = “ABC”, S2= “DEF”, Output: ADBECF.

  8. Create a JAVA program to find the maximum and minimum occurred character in a String.

  9. Create a JAVA program to sort the characters of the string S. After sorting, extract the odd-positioned characters and store it into a string variable and print it.

  10. Write a JAVA program to compute the string age. Age of the string can be calculated using the formula: Age = Length of the string S + Alphabetical index of the last-character. Example: If the string is “ABAB”, output = (4+2) = 6.

java-string-operations's People

Contributors

sunil-gudle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.