String to char in java- str.charat(index)

If you want to display or get any one character from a string, java provides a method .charAt(index) [this returns a character from the specified index], let’s see the implementation index should be with in the string length range, else will get exception java.lang.StringIndexOutOfBoundsException public static void main(String[] args) { String myStr = new String(“Welcome”);…

String to char array in java- str.tochararray()

If you want to convert a string into character array, java provides a method .toCharArray() [this returns a character array], let’s see the implementation public class CharString { public static void main(String[] args) { String myStr = new String(“Welcome”); char[] chars; System.out.println(“Individual characters – “); chars = myStr.toCharArray(); for(int i=0 ; i < chars.length ;…

Run protractor tests in typescript using VSCode

In our previous post, we have seen how to install protractor and it’s prerequisites. we will setup some more steps to run protractor tests Create a new file conf.ts under C:\Protractor\Test\ refer configuration library for more options. Create a spec file calculator.ts under C:\Protractor\Test\specs Jasmine framework considers each test script as specs, Describe represents test suite…