Filter in AngularJs

<!DOCTYPE html> <html> <head> <script src=”http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js”></script> <script> var app=angular.module(‘myApp’,[]); app.controller(‘ct’,function($scope){ $scope.arr=[“Shiv”,”Jagan”]; }); </script> </head> <body> <div ng-app=”myApp” id=”u” ng-controller=”ct”> Name<input type=”text” ng-model=”userName”/> <ul> <li ng-repeat=”x in arr|filter:userName”> User Name:{{x}} </ul> </div>

StringBuilder Demo

public class StringBuilderDemo {      public static void main(String[] args) {             StringBuilder sb = new StringBuilder(“Shiv”);                           System.out.println(“Original String “ + sb);                             System.out.println(“substring: “ + sb.substring(0,2));             //  StringBuilder java.lang.StringBuilder.replace(int start, intend, String Read More

String Demo

public class StringDemo {        public static void main(String[] args) {        String s=new String(“Shiv”);               char firstChar=s.charAt(0);        System.out.println(“First Charecter”+firstChar);               boolean status=s.contains(“i”);        if(status){               System.out.println(“i Found”);        }else{               System.out.println(“i Not Found”);        }        Read More