Przejdź do głównej zawartości

Posty

Wyświetlam posty z etykietą zmienne

Java Boolean Operators

Operatory logiczne dla Boolean: A B A|B A&B A^B !A false false false false false true true false true false true false false true true false true true true true true true false false | the OR operator & the AND operator ^ the XOR operator ! the NOT operator || the short-circuit OR operator && the short-circuit AND operator == the EQUAL TO operator != the NOT EQUAL TO operator 

String - najczęściej używane metody

Substring public String substring(int startIndex)  public String substring(int startIndex, int endIndex) String s = "Hello World" ; System . out . println ( s . substring ( 3 )); System . out . println ( s . substring ( 1 , 3 )); StringBuffer - creates mutable string. String is originally immutable. Used operation on Strings StringBuffer buffer = new StringBuffer ( "Hello World" ); buffer . append ( " GREAT ADDITION" ); System . out . println ( buffer ); StringBuilder - more efficient than StringBuffor https://www.javatpoint.com/StringBuilder-class charAt() - returns char on defined index contains() - true false endsWith()  startsWith() -  indexOf() - returns index of char isEmpty() - true false length() -  replace() - replace char  split() trim() -  toLowerCase() i toUpperCase String format() -  method returns the formatted string by given locale, format and arguments