Чашечка Java
Open in Telegram
Лучшие материалы по Java на русском и английском Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels
Show more8 554
Subscribers
-424 hours
-197 days
-2530 days
Posts Archive
8 553
Backend Developer at Brains Valley Company (2 – 7 years Exp)
Read: https://jobs.thecrazyprogrammer.com/backend-developer-at-brains-valley-company-2-7-years-exp/
8 553
iOS Developer at Innominds Software Sez India Private Limited (4 – 9 years Exp)
Read: https://jobs.thecrazyprogrammer.com/ios-developer-at-innominds-software-sez-india-private-limited-4-9-years-exp/
8 553
Java Developer at Yectra Technologies Private Limited (2 – 6 years Exp)
Read: https://jobs.thecrazyprogrammer.com/java-developer-at-yectra-technologies-private-limited-2-6-years-exp/
8 553
Java Developers at ValueLabs (3 – 8 years Exp)
Read: https://jobs.thecrazyprogrammer.com/java-developers-at-valuelabs-3-8-years-exp/
8 553
Php Developer at Naman Finlease Pvt Ltd (4 – 8 years Exp)
Read: https://jobs.thecrazyprogrammer.com/php-developer-at-naman-finlease-pvt-ltd-4-8-years-exp/
8 553
Senior Software Engineer at ZettaBolt (5 – 10 years Exp)
Read: https://jobs.thecrazyprogrammer.com/senior-software-engineer-at-zettabolt-5-10-years-exp/
8 553
Trainee Software Developer at QuickXpert Infotech (0 – 5 years Exp)
Read: https://jobs.thecrazyprogrammer.com/trainee-software-developer-at-quickxpert-infotech-0-5-years-exp/
8 553
Java Developer at Dreamquest Software Consulting Private Limited (3 – 4 years Exp)
Read: https://jobs.thecrazyprogrammer.com/java-developer-at-dreamquest-software-consulting-private-limited-3-4-years-exp/
8 553
Top 12 Java Thread, Concurrency, and Multithreading Interview Questions and Answers
Java concurrency and thread interview questions answers
Multithreading is an important feature of the Java programming language, which
means threads are also an important part of any Java interview. It's true and
in fact, at beginners and freshers, level Thread interview questions in Java
are one of the most difficult to answer. One reason for interview questions
related to multithreading and concurrency being difficult is confusion around
how multiple threads work together and the second is threads are genuinely a
complicated topic to understand and use correctly.
Java Interview questions and tutorials
Read: http://www.java67.com/2012/08/5-thread-interview-questions-answers-in.html
8 553
Write a Program to Find Sum of Digits in Java
One of the common programming practice question thrown to beginners is to write a program to calculate the sum of digits in an integral number. For example, if the input is 123456 then output or sum of the digit is (1+2+3+4+5+6) = 21. An additional condition is you can not use any third party or library method to solve this problem. This program is not as simple as it looks and that's why it's a good exercise, you must know some basic programming techniques e.g. loops, operators, and logic formation to solve this problem. Let's see how we can solve this problem using Java programming language. In order to calculate the sum of digits, we must get digits as numbers. So your first challenge is how do you get the digits as numbers? How do we extract 6 out of 123456?
Java Interview questions and tutorials
Read: http://www.java67.com/2014/06/write-program-to-find-sum-of-digits-in-java.html
8 553
How to use Multiple Catch block for Exception handling in Java? Example Tutorial
Java 7 in many ways improved exception handling. Two of the feature of Java 7 which improves exception handling are the ability to catch the multiple exceptions in one catch block and closing resources automatically using Automatic resource management block. Java has long been criticized for its verbose exception handling code, mandatory to handle checked Exceptions in Java. Programmers always complained that it clutters the code and reduced readability. Java 7 somehow reduces this pain by improving the Exception handling feature e.g. multiple catches and ARM blocks. In this Java 7 tutorial, we will see how to catch multiple exceptions in one catch block using JDK7.
Java Interview questions and tutorials
Read: http://www.java67.com/2013/01/java-7-improved-exception-handling-multiple-catch-block.html
8 553
How to format Date in Java - SimpleDateFormat Example
SimpleDateFormat in Java is used to format Date in Java. You can format date on any String format based upon various attribute available in SimpleDateFormat class e.g. mm, dd, YY etc. You can also put timezone information in formatted Date using Z attribute of DateFormat class. SimpleDateFormat is sub class of DateFormat and provide format() and parse() method to convert Date to and from String in Java. Worth noting is that SimpleDateFormat is not thread-safe and should not be shared with others. Avoid using static SimpleDateFormat in Java classes. If you want to share SimpleDateFormat or want to make it thread-safe, you can use ThreadLocal variable in Java to avoid sharing SimpleDateFormat among multiple threads. parse() method of SimpleDateFormat throws ParseException if String input is not a valid date or can not be parsed into mentioned format.
Java Interview questions and tutorials
Read: http://www.java67.com/2013/01/how-to-format-date-in-java-simpledateformat-example.html
8 553
Difference between URL, URI and URN - Interview Question
All three URI, URL, and URN are used to identify any resource or name on the internet, but there is a subtle difference between them. URI is the superset of both URL and URN. By the way, the main difference between URL and URI is protocolto retrieve the resource. URL always include a network protocol e.g. HTTP, HTTPS, FTP etc to retrieve a resource from its location. While URI, in case of URN just uniquely identifies the resource e.g. ISBN numbers which are a good example of URN is used to identify any book uniquely. In this article, we will briefly see what is URI, URL, and URN and then see the main difference between URI, URL, and URN.
Java Interview questions and tutorials
Read: http://www.java67.com/2013/01/difference-between-url-uri-and-urn.html
8 553
How to traverse iterate or loop ArrayList in Java
How to Loop ArrayList in Java
Iterating,
traversing or Looping ArrayList in Java means accessing every object
stored in ArrayList and performing some operations like
printing them. There are many ways to iterate, traverse or Loop ArrayList in Java e.g. advanced for loop,
traditional for loop with size(), By using Iterator
and ListIterator along with while loop etc. All the method of Looping
List in Java also applicable to ArrayList because ArrayList
is an essentially List. In next section we will see a code example of Looping ArrayList in Java.
Java Interview questions and tutorials
Read: http://www.java67.com/2012/08/how-to-traverse-iterate-or-loop-ArrayList-in-java-example-tutorial.html
8 553
How to use Java Enum in Switch Case Statement - Exampel Tutorial
Java Enum in Switch Case Statement
Yesterday, someone ask me Can we use Java Enum in Switch case? Obviously, he was learning Enum and not aware that How powerful Enum in Java is. Yes, You can use Enum in Switch case statement in Java like int primitive. If you are familiar with enum int pattern, where integers represent enum values prior to Java 5 then you already knows how to use the Switch case with Enum. Using Java Enum in the Switch case is pretty straightforward, Just use Enum reference variable in Switch and Enum constants or instances in CASE statement. In this Java tutorial we will see one example of How to use Enum in Switch statement in Java.
Java Interview questions and tutorials
Read: http://www.java67.com/2012/09/how-to-use-java-enum-in-switch-case-example.html
8 553
What is CopyOnWriteArrayList in Java - Example Tutorial
CopyOnWriteArrayList vs Array List in Java
CopyOnWriteArrayList is a concurrent Collection class introduced in Java 5 Concurrency API along with its popular cousin ConcurrentHashMap in Java. CopyOnWriteArrayList implements List interface like ArrayList, Vector, and LinkedList but its a thread-safe collection and it achieves its thread-safety in a slightly different way than Vector or other thread-safe collection class. As the name suggests CopyOnWriteArrayList creates a copy of underlying ArrayList with every mutation operation e.g. add, remove, or when you set values. That's why it is only suitable for a small list of values which are read frequently but modified rarely e.g. a list of configurations.
Java Interview questions and tutorials
Read: http://www.java67.com/2012/09/what-is-copyonwritearraylist-in-java-example-vs-arraylist.html
8 553
Difference between Error vs Exception in Java - Interview question
Both Error and Exception are
derived from java.lang.Throwable in Java but main difference
between Error and Exception is kind of error they represent. java.lang.Error represent
errors which are generally can not be handled and usually refer catastrophic
failure e.g. running out of System resources, some examples of Error in Java
are java.lang.OutOfMemoryError
or Java.lang.NoClassDefFoundError
and java.lang.UnSupportedClassVersionError.
On the other hand java.lang.Exception represent errors which can
be catch and dealt e.g. IOException which comes while performing I/O
operations i.e. reading
files and directories.
Java Interview questions and tutorials
Read: http://www.java67.com/2012/12/difference-between-error-vs-exception.html
8 553
Java program to get SubList from ArrayList - Example
Sometimes we need subList from ArrayList in Java. For example, we have an ArrayList of 10 objects and we only need 5 objects or we need an object from index 2 to 6, these are called subList in Java. Java collection API provides a method to get SubList from ArrayList. In this Java tutorial, we will see an example of getting SubList from ArrayList in Java. In this program, we have an ArrayList which contains 4 String objects. Later we call ArrayList.subList() method to get part of that List.
Java Interview questions and tutorials
Read: http://www.java67.com/2012/09/java-program-to-get-sublist-from-ArrayList-example.html
Available now! Telegram Research 2025 — the year's key insights 
