Save my name, email, and website in this browser for the next time I comment. For example, the following code gets the character at index 9 in a string: String anotherPalindrome 'Niagara. The index of the first character is 0, while the index of the last character is length ()-1. Thus the length of the substring is endIndex-beginIndex. You can get the character at a particular index within a string by invoking the charAt () accessor method. Your email address will not be published. Returns a substring starting from specified beginIndex till the character present at endIndex 1. If one explicitly casts a value to character varying( n ) or character( n ). However if you type 'c', you got a char and not a String object. An attempt to store a longer string into a column of these types will result. Java Basics Introduction Hello World Object and Class Data types Variables Access modifiers Super keyword this keyword Control Statements For loop While loop Do While loop if else statement in java Switch case break statement continue statement Object Oriented Constructor Abstraction Interface Abstract class Abstract Class Vs Interface Polymorphism Encapsulation Collections HashMap LinkedHashMap TreeMap HashSet TreeSet LinkedHashSet ArrayList HashMap to ArrayList Sort HashMap Iterate HashMap Internal Working of HashMap Hashtable Vs HashMap HashMap Vs HashSet Comparable Comparator Comparator Vs Comparable Multithreading Thread Process vs thread Join Daemon thread Sleep Can we start a thread twice in java Can we call run() method directly to start a new thread wait, notify and notifyAll print even and odd numbers Sleep vs wait Object level locking vs Class level locking Executor Framework ThreadPoolExecutor newFixedThreadPool newCachedThreadPool ScheduledThreadPoolExecutor FutureTask Concurrent Utils ConcurrentHashMap BlockingQueue CountDownLatch CyclicBarrier Semaphore Exchanger CountDownLatch vs CyclicBarrier Serialization Serialization Externalizable serialVersionUID Transient keyword Serializable vs Externalizable Exception Handling Exception handling Throw vs Throws Custom Exception Checked Vs unchecked Exception try with resources Java 8 Functional interface Lambda Expressions Stream filter Interface default methods Supplier Consumer Predicate Collectors forEach loop Lamba Expression Comparator Java 9 Private methods in interface Try with resources Javadoc Improvement Underscore(_) keyword Diamond Operator Annotation Interview Questions Core java OOPS Exception Handling Method overloading and overriding Multithreading Collections Serialization String Immutable Data Structure and algorithm Interview Programs at 5:06 Add a comment 8 Answers Sorted by: 15 No it's wrong.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |