Below is my code:
String str = "something";
char ch = 'e';
int noOfOcc = 1;
System.out.println("No of occurrences of '"+ch+"' in "+str+" is "+noOfOcc);
Expected output should be as follows:
No of occurrences of 'e' in "something" is 1
How can I print that something in double quotes? I need solution for this case where we are using variables in System.out.println();. and I need the value of that variable in double quotes.