Java Program to convert upper Case to lower Case and Vice-versa | Java Interview Questions & Answers

preview_player
Показать описание
In this video, we showed how to convert String's lowercase character into uppercase and vice-versa with and without using inbuild functions.

Input : CloudTech
Output : cLOUDtECH

#javainterviewquestions
#java
#javacoding
Рекомендации по теме
Комментарии
Автор

But again, in ur code, u took the help of an inbuilt method isLowerCase()...
Inorder to achieve without that we have to put condition like (65=<c<=90 then add logic to convert to lower case ) and (97 =<c<=122 then write uppercase logic)

shivanshsrivastava
Автор

If there is any other characters in string other than alphabets then it will add 32 in that character's ASCII value and set the character according to that value.

Basically else part will be executed.

miralkhunt
Автор

If it contains number, then it will check for that number correspondingly what is the asic value then it will add and print respected value.

pruthvirajn
Автор

Can you please write program to calculate & list n prime numbers in Java 8 streams

SuperHuman
Автор

it will not work because every integer is some ascii value and integer has no uppercase or lowercase

ashishsingh
Автор

QUESTION FOR AUDIENCE? THE ANSWER IS = that will put another else condition and then and there we will do str = str +c

animff
Автор

package com.method;

public class LowerUpper
{
public static void main(String[] args) {
String str="CloudTech";
String newstr="";
char[] array = str.toCharArray();

for(int i=0;i<array.length;i++)
{

{

}
else
{

}
}

}
}

satishbhutawale
Автор

I can't understand you have to use commet and describe 😡😡😡

jeebanpradhan