Naveen--You need not say during the end of the video---subscibe,share,like!!!Needless to say that!!We have all loved your videos and will be loving your videos--When we love then subscription,liking,sharing is unimaginable!Thanks Naveen!!!
@lisazhou77765 жыл бұрын
Naveen, I like your videos very much. Your explanation is amazing, simple and clear. Thank you very much!
@sowjanyadarbha84034 жыл бұрын
Thanq so much Naveen for the clear explanation. Your videos brought me confidence in Java
@sachin218906 жыл бұрын
Hi Naveen, How are we able to change the original values of strings 's' and 's1' here by using replaceAll() function ? aren't they immutable? I'm confused here
@ravijharox016 жыл бұрын
Run, below code. You will be able to find out the difference. String str = "!@#$%^&*()_+}{|?>::
@coolsaty0076 жыл бұрын
If you observe carefully what he has done is "s=s.replaceAll()". which means he is assigning the new value to s. Now "s" is pointing to a new string object.
@mdrajeshwar13 жыл бұрын
@@ravijharox01 I am trying with this solution String s = "拉杰什瓦尔 Welcome 拉杰什瓦尔 220120"; // regular expression [^a-zA-Z0-9] String Removed =s.replaceAll("[^a-zA-Z0-9]", " "); System.out.println(Removed); Out put is Welcome 220120 perfectly working only we have assigned to a new string variable
@ritumehta12806 жыл бұрын
Hi Naveen, you are doing a great job. All of your videos are really helpful. The only thing if you could is please increase the font of the text for your upcoming videos! Thanks! :)
@pratimadaswante41173 жыл бұрын
Hi sir in this program when I have enter backslash(\) then that slash remains there instead of removing it🙄
@shafiqurrahman58095 жыл бұрын
Hi, Naveen if String is immutable how are we able to change it? Please clarify why in this case String is mutable?
@vanajabethina59915 жыл бұрын
Me as same doubt na
@selectiveeagle40405 жыл бұрын
same here
@shilpajain40613 жыл бұрын
HI , Please help me fix the below error: Error occurred during initialization of boot layer java.lang.module.FindException: Error reading module: C:\Users\shilpa.jain\eclipse-workspace\OOPS\bin Caused by: java.lang.module.InvalidModuleDescriptorException: MyCar.class found in top-level directory
@mayankbhatkar44873 жыл бұрын
If we want to allow Japanese text and also restrict special character, how can we achieve that?
@nikhiltillu62016 жыл бұрын
Hi Naveen, You said not to use Ascii codes, can you let me know the reason for it ? The concept to use a regex was good, but its removing the space too. With the help of ascii values we can include the spaces too. int len = s.length(); String n = ""; char ch; int ascii; for (int i = 0; i < len; i++) { ch = s.charAt(i); ascii = (int)ch; if((ascii >= 65 && ascii = 97 && ascii
@croonmelody70972 жыл бұрын
use regex alongwith space like [^ a-zA-Z0-9]
@passgreenearth3 жыл бұрын
Hi Naveen, Chinese character is not saving in my eclipse, please help.
@chanduyagnesh5501 Жыл бұрын
if we donot use inbuilt methods then how to do that also explain sir
@ujjwalverma77876 жыл бұрын
sir, please help me i really confuse between them what is the difference between the "array.length and array.length()" some time array.length will work and some time array.length() will work. is there is any rules for is for using it? with String arr.length() will work but when we use an integer type, its work with array.length.
@vikaskumar-qr5tj6 жыл бұрын
length() is method present in object class to calculate length of string but length is a variable which returns size of array.....
@achintyasett96214 жыл бұрын
Hi Naveen, Thanks for this helpful video. I would like to add that a shorter regex [^\w\d] will also work in the given scenario.
@Deepak-wm4qg3 жыл бұрын
Bro, ewr screen is not visible in 360p also Thts y, low traffic in ewr channel, pls remove that side bar, so that it could be seen clearly
@nitingupta825 жыл бұрын
Awesome!! Thank You Very Much!!
@chetanachavan61163 ай бұрын
str=str.replaceAll("[^ a-zA-Z0-9]",""); by using this we can keep space as it is in between 2 words. but what if more than space 1 space I want to remove from 2 words.
@salehashamim78034 жыл бұрын
Please someone write the particular replaceAll line. It is not visible on my mobile.
@kapilrana23615 жыл бұрын
Hi Naveen, Nice explanation. One query, If the string is immutable then why replace method is there. I can change the value using the replace method. public class RemoveJunkCharacter { public static String s = "kapil"; public static void main(String args[]) { s= s.replace('l', 'i'); s=s.replace('p', 'i'); System.out.println(s); } } Output: kaiii. Please suggest, I think I am getting something wrong.
@bharathkoneru40085 жыл бұрын
For every operation performed on the string, a new String object is created with those changes. Here, first you declared String s='kapil' string var s is referring to String object which has value 'kapil' Now on using replace method on this String obj. a new string object is created. s.replace('l','i'); Here you are assigning the entire right hand side expression to the string variable s=s.replace('l','i') which was initially referring to string obj kapil. On this assignment this s starts referring to this newly created object.
@ajayparjapati09023 жыл бұрын
sir how can print the string and also print the chrctr int last like= hello@#@#@ like this
@anithas50145 жыл бұрын
Hi Naveen I am getting the output as ^Testing123 Console output is generating with exclude symbol
@sureshm20475 жыл бұрын
Hi Naveen wanted to join online training from you!! Is there any chance for us?
@raghureddy57127 жыл бұрын
thank you Naveen bro and How to give spaces?
@ravijharox016 жыл бұрын
str = str.replaceAll("[^a-zA-Z0-9\\s]", "");
@nexar28113 жыл бұрын
Thank You Boss
@kamleshlohar6 жыл бұрын
thanks for better concepts
@azimadayani23793 жыл бұрын
Didn’t get replace all option
@prabeshkumarbhagat29896 жыл бұрын
Thanks Naveen.
@maarcoo975 жыл бұрын
Thanks!
@sridevireddy13717 жыл бұрын
Thank you Naveen
@oopsididitagain85725 жыл бұрын
Thank you
@deepakjava35064 жыл бұрын
thank you so much.
@ramanujamsunkari9466 жыл бұрын
Please increase font size.... It is not clear to watchable
@samalmaleesha2834 жыл бұрын
lifesaver
@umeshnaik8446 жыл бұрын
how to retain space
@mariabajwa86326 жыл бұрын
thank u
@VandanaYadav-yp9zv6 жыл бұрын
Hi Naveen FIrst of all Thanks for all the great work you are doing . one observation i have regarding replaceALL() method is that String samplestring = "^^^^^^van^^^^^^^^^^yad^^^^^^^^^^^^^^^^^^^^"; samplestring = samplestring.replaceAll("[^a-zA-z]", ""); System.out.println("samplestring after removing junk:"+samplestring); It dosent replace ^ sign from the sample string.
@ravijharox016 жыл бұрын
String samplestring = "^^^^^^van^^^^^^^^^^yad^^^^^^^^^^^^^^^^^^^^"; samplestring = samplestring.replaceAll("[^a-zA-Z]", ""); System.out.println("samplestring after removing junk:" + samplestring); Try above code, it will work. You used 'a-zA-z' instead of 'a-zA-Z'
@VandanaYadav-yp9zv6 жыл бұрын
Thanks Ravi! it worked now!
@salehashamim78033 жыл бұрын
Java code to remove double quotes string in excel.