#mostly asked core java interview questions
Explore tagged Tumblr posts
Text
How do I get prepared for TCS technical interview questions?
Cracking the TCS Technical Interview – Here's How to Prepare
If you're getting ready for TCS placements, the first thing you need to understand is the TCS recruitment process. TCS mostly hires through the TCS NQT (National Qualifier Test), and the selection happens in multiple stages.
TCS Recruitment Process
Online Assessment (TCS NQT) This is the first step, where you’ll be tested across several sections:
Numerical Ability – Covers basic math topics like percentages, profit and loss, time and work, etc.
Verbal Ability – Includes English grammar, reading comprehension, sentence correction, and vocabulary.
Reasoning Ability – Focuses on puzzles, sequences, and logical thinking.
Programming Logic – Basic programming concepts such as loops, functions, and conditionals.
Coding Round – You’ll be asked to solve coding problems using C, C++, Java, or Python.
Technical Interview Once you clear the online assessment, you'll move on to the technical interview. This round includes questions on:
Programming languages like C, C++, Java, or Python
Data Structures and Algorithms – Arrays, Linked Lists, Searching, Sorting, and more
Object-Oriented Programming – Classes, Inheritance, Polymorphism, and other core concepts
Database Management – SQL queries, normalization, joins, and other DBMS topics
Managerial and HR Interview These final rounds evaluate your communication skills, attitude, problem-solving approach, and ability to work in a team. You may also be asked about your final year project and previous experiences.
How to Prepare for TCS Interviews
Start with the basics – make sure your programming fundamentals are clear.
Practice coding questions every day to strengthen your logic and problem-solving skills.
Refer to our blog on TCS NQT Coding Questions and Answers 2025 for real practice problems.
If you're aiming for a higher package, check out the TCS NQT Advanced Coding Questions as well.
Prepare well for your final year project – interviewers often ask detailed questions about it.
Taking mock interviews and practice tests can help you gain confidence and improve your performance.
For complete resources, including sample papers and the latest updates, visit our TCS Dashboard here: TCS Dashboard – PrepInsta
Start preparing the smart way and increase your chances of landing the job.
1 note
·
View note
Video
instagram
Mostly asked Java Interview Questions https://www.tutorialsmate.com/2020/06/core-java-interview-questions.html Please share it and help others 😁 Follow on Instagram 👉 https://www.instagram.com/p/CBFjCY_gKi6/?igshid=123xqq4zp37hl
1 note
·
View note
Link
Frequently Asked Core Java Interview Questions
Why we can't use "this" inside static context? || Core Java FAQs Videos
#java inerview questions#core java interview questions#most asked java interview questions#mostly asked core java interview questions#Frequently Asked Core Java Interview Questions
0 notes
Link
Java Interview Questions You Need To Know ##UdemyFreeCourses ##udemykupon #Interview #Java #Questions Java Interview Questions You Need To Know One common thing about interview is important questions and programs which asked in most of the times. I used to attend multiple interviews to collect the common question and programs. If you have plans to attend interviews just go through the course and you will get better idea. People who looking for a Job change make use of this course. The programs I have added here is only based on my own experience in India. I'm surfing around the internet as well to find out the predictable programs. In this course I have included the questions from Java mostly Core Java area. I'll keep adding new content every week. This course covers the following areas. 1. Core Java fundamental Programs 2. Java 8 New features Note : This course will be updated with new interview topics and feature in java . Thanks Arun Ammasai Who this course is for: Students People looking for job change 👉 Activate Udemy Coupon 👈 Free Tutorials Udemy Review Real Discount Udemy Free Courses Udemy Coupon Udemy Francais Coupon Udemy gratuit Coursera and Edx ELearningFree Course Free Online Training Udemy Udemy Free Coupons Udemy Free Discount Coupons Udemy Online Course Udemy Online Training 100% FREE Udemy Discount Coupons https://www.couponudemy.com/blog/java-interview-questions-you-need-to-know/
0 notes
Video
youtube
Core Java Interview Questions | How to Create Daemon Thread Register For Online Training New Batches: How to Create Daemon Thread | Core Java Interview Questions Watch Free YouTube Tutorials:
#CORE JAVA INTERVIEW#core java interview questions#Core Java Tutorial#java interview questions#java interview questions online#most asked java interview questions#mostly asked java interview questions
0 notes
Text
15 Technical Core Java Interview Questions Answers for Experienced Developers
When the experience of a Java Programmer grows in the years e.g. when it goes from beginner years ( 2 to 4) to more experience or sort of senior level ( 5 to 7 years), Core Java Interview Questions also change a bit. Of course, basics like data structure, algorithms, and object-oriented programming remains the same, but types of questions will become more advanced and their answers will definitely need to be more detailed and accurate. I often receive queries about core Java questions asked to a senior developer of 5 to 6-year experience, or, sometimes, I am going for an interview of senior Java developer, what kind of questions I should expect. This sometimes puzzles me, that once you become senior, you automatically start taking part in the interview, and you should have an idea of what to expect on Interviews, but at the same time, I can understand that having an idea of questions before going on Interview, helps preparation. Of course, you are not going to get a question like the one you have faced on 2 to 3 years level Java Interviews, but It also depends on different rounds of Interviews.
I have not seen many changes in the questions asked on the telephonic round, which almost remains the same. You will find some fact-based, some coding questions and a few tricky questions. On the other hand face-to-face, interviews have become more detailed and more tricky, especially with nasty follow-ups.
In this article, I am going to share some 15 technical core Java Interview Questions, which I have seen asked senior and experienced developers of 4 to 6 years of experience in different interviews, mostly on telephonic rounds. I am not posting answers as of now, but you can find answers to most of the questions on here or the Javarevisited blog.
If you are in a hurry and actively looking for a Java Developer Job, you can also take help from some good books written to prepare you for Java J2EE interviews. Books like, Java Programming Interview Exposed covers all important topics for both core Java and Java EE interviews, which include basic Java questions, data structure and algorithms, JVM internals and GC tuning, Hibernate and Spring interview questions, JUnit ant unit testing questions, and some Java 8 stuff.
It also covers knowledge of other JVM languages like Scala, Groovy and other platforms like Android. A perfect companion to do well in Java interviews.
If you want to prepare more on the coding side then you can also check out Cracking the Coding Interview, which contains almost 150 programming questions and solutions from technical interviews of big tech companies like Amazon, Facebook, Google, Twitter, and Microsoft.
15 Core Java Questions For 5 to 6 Years Experienced
All these questions have been collected from quite senior developers, which has at least 5 years of experience. They have seen these questions on different rounds of their core Java interviews, including telephonic and face-to-face rounds on different companies, mostly on Investment banks like Barclays, Morgan, RBS, and others.
1. What is Busy Spinning? Why Should You Use It in Java?
One of the interesting multithreading question to senior Java programmers, busy spinning is a waiting strategy, in which a thread just wait in a loop, without releasing the CPU for going to sleep. This is a very advanced and specialized waiting strategy used in the high-frequency trading application when the wait time between two messages is very minimal.
By not releasing the CPU or suspending the thread, your thread retains all the cached data and instruction, which may be lost if the thread was suspended and resumed back in a different core of CPU.
This question is quite popular in high-frequency low latency programming domain, where programmers are trying for extremely low latency in the range of micro to milliseconds. See here more 50+ advanced thread interview questions for experienced programmers.
core java interview questions for senior developers
2. What is Read-Write Lock? Does ConcurrentHashMap in Java Use The ReadWrite Lock?
ReadWrite Lock is an implementation of a lock stripping technique, where two separate locks are used for reading and write operation. Since read operation doesn't modify the state of the object, it's safe to allow multiple thread access to a shared object for reading without locking, and by splitting one lock into the read and write lock, you can easily do that.
Java provides an implementation of a read-write lock in the form of the ReentrantReadWritLock class in the java.util.concurrent.lock package. This is worth looking before you decide to write your own read-write locking implementation.
Also, the current implementation of java.util.ConcurrentHashMap doesn't use the ReadWriteLock, instead, it divides the Map into several segments and locks them separately using different locks. This means any given time, only a portion of the ConcurrentHashMap is locked, instead of the whole Map. See how ConcurrentHashMap internally works in Java for more detail.
This core Java question is also very popular on senior and more experienced level Java interviews e.g. 4 to 6 years, where you expect Interviewer to go into more detail, like by asking you to provide an implementation of the read-write lock with different policies. If you are an experienced Java programmer, consider reading Java Concurrency in Practice to gain more confidence about multithreading and concurrency in Java.
3. How to Make an Object Immutable in Java? Why Should You Make an Object Immutable?
Well, Immutability offers several advantages including thread-safety, ability to cache and result in a more readable multithreading code. See here to learn how to make objects Immutable. Once again, this question can also go into more detail and depending on your answer, can bring several other questions e.g. when you mention Spring is Immutable, be ready with some reasons on Why String is Immutable in Java.
4. Which Design Patterns have You Used in Your Java Project?
Always expect some design patterns related question for Core Java Interview of senior developer position. It's a better strategy to mention any GOF design pattern rather than Singleton or MVC, which almost every other Java developer use it.
Your best bet can be a Decorator pattern or maybe Dependency Injection Pattern, which is quite popular in the Spring Framework. It's also good to mention only the design patterns which you have actually used in your project and knows it's tradeoffs.
It's common that once you mention a particular design pattern say Factory or Abstract Factory, Interviewer's next question would be, have you used this pattern in your project? So be ready with proper examples and why you choose a particular pattern. You can also see this article for more advanced design pattern questions from Java interviews.
5. Do you know about Open Closed Design Principle or Liskov Substitution Principle?
Design patterns are based on object-oriented design principles, which I strongly felt every object-oriented developer and the programmer should know, or, at least, have a basic idea of what are these principles and how they help you to write better object-oriented code. I
f you don't know the answer to this question, you can politely say No, as it's not expected from you to know the answer to every question, but by answering this question, you can make your claim stronger as many experienced developers fail to answer basic questions like this. See Clean Code learn more about object-oriented and SOLID design principles.
6. Which Design Pattern Will You Use to Shield Your Code From a Third Party library Which Will Likely to be Replaced by Another in Couple of Months?
This is just one example of the scenario-based design pattern interview question. In order to test the practical experience of Java developers with more than 5 years of experience, companies ask this kind of question. You can expect more real-world design problems in different formats, some with more detail explanation with context, or some with only intent around.
One way to shield your code from a third-party library is to code against an interface rather than implementation and then use dependency injection to provide a particular implementation. This kind of question is also asked quite frequently to experienced and senior Java developers with 5 to 7 years of experience.
Question 7) How do you prevent SQL Injection in Java Code?
This question is more asked J2EE and Java EE developers than core Java developers, but, it is still a good question to check the JDBC and Security skill of experienced Java programmers.
You can use PreparedStatement to avoid SQL injection in Java code. Use of the PreparedStatement for executing SQL queries not only provides better performance but also shield your Java and J2EE application from SQL Injection attack.
On a similar note, If you are working more on Java EE or J2EE side, then you should also be familiar with other security issues including Session Fixation attack or Cross-Site Scripting attack and how to resolve them. These are some fields and questions where a good answer can make a lot of difference in your selection.
Question 8) Tell me about different Reference types available in Java, e.g. WeakReference, SoftReference or PhantomReference? and Why should you use them?
Well, they are different reference types coming from java.lang.ref package and provided to assist Java Garbage Collector in a case of low memory issues. If you wrap an object with WeakReference than it will be eligible for garbage collected if there are o strong references. They can later be reclaimed by the Garbage collector if JVM is running low on memory.
The java.util.WeakHashMap is a special Map implementation, whose keys are the object of WeakReference, so if only Map contains the reference of any object and no other, those object can be garbage collected if GC needs memory. See Java Performance The Definitive Guide learn more about how to deal with performance issues in Java.
core java technical interview questions and answers for experienced
Question 9) How does get method of HashMap works in Java?
Yes, this is still one of the most popular core Java questions for senior developer interviews. You can also expect this question on telephonic round, followed by lot's of follow-up questions as discussed in my post how does HashMap work in Java.
The short answer to this question is that HashMap is based upon hash table data structure and uses hashCode() method to calculate hash code to find the bucket location on the underlying array and equals() method to search the object in the same bucket in case of a collision. See here to learn more about how does get() method of HashMap works in Java.
Question 10) Which Two Methods HashMap key Object Should Implement?
This is one of the follow-up questions I was saying about in previous questions. Since working of HashMap is based upon hash table data structure, any object which you want to use as a key for HashMap or any other hash-based collection e.g. Hashtable, or ConcurrentHashMap must implement equals() and hashCode() method.
The hashCode() is used to find the bucket location i.e. index of the underlying array and equals() method is used to find the right object in a linked list stored in the bucket in case of a collision. By the way, from Java 8, HashMap also started using a tree data structure to store the object in case of a collision to reduce the worst-case performance of HashMap from O(n) to O(logN). See the article for learning more about how does HashMap handless collisions in Java.
Question 11) Why Should an Object Used As the Key should be Immutable?
This is another follow-up of previous core Java interview questions. It's good to test the depth of technical knowledge of candidates by asking more and more questions on the same topic. If you know about Immutability, you can answer this question by yourself. The short answer to this question is key should be immutable so that hashCode() method always return the same value.
Since the hash code returned by hashCode() method depends on the content of the object i.e. values of member variables. If an object is mutable than those values can change and so is the hash code. If the same object returns different hash code once you inserted the value in HashMap, you will end up searching in different bucket locations and will not able to retrieve the object. That's why a key object should be immutable. It's not a rule enforced by the compiler but you should take care of it as an experienced programmer. See the article for more advanced Java Collection interview questions.
Question 12) How does ConcurrentHashMap achieve its Scalability?
Sometimes this multithreading + collection interview question is also asked as, the difference between ConcurrentHashMap and Hashtable in Java. The problem with synchronized HashMap or Hashtable was that the whole Map is locked when a thread performs any operation with Map.
The java.util.ConcurrentHashMap class solves this problem by using a lock stripping technique, where the whole map is locked at different segments and only a particular segment is locked during the write operation, not the whole map. The ConcurrentHashMap also achieves its scalability by allowing lock-free reads as read is a thread-safe operation. See here for more advanced multi-threading and concurrency questions in Java.
Question 13) How do you share an object between threads? or How to pass an object from one thread to another?
There are multiple ways to do that e.g. Queues, Exchanger, etc, but BlockingQueue using Producer-Consumer pattern is the easiest way to pass an object from thread to another.
Question 14) How do find if your program has a deadlock?
By taking thread dump using kill -3, using JConsole or VisualVM), I suggest preparing this core java interview question in more detail, as the Interviewer definitely likes to go with more detail e.g. they will press with questions like, have you really done that in your project or not?
Question 15) How do you avoid deadlock while coding?
By ensuring locks are acquire and released in an ordered manner, see here for a detailed answer to this question.
That's all on this list of Core Java Interview Questions for senior developers and experienced programmers. I haven't included a lot of questions from other important topics like Exception handling, Garbage Collection tuning and JVM Internals, which is also very popular among Java programmers with 5 to 6 years of experience, maybe I will include them in the next part.[Source]-https://www.java67.com/2013/07/15-advanced-core-java-interview-questions-answers-senior-experienced-5-6-years-programmers-developers.html
We provide the best Advanced Java training, navi mumbai. We have industry experienced trainers and provide hands on practice. Basic to advanced modules are covered in training sessions.
0 notes
Text
THE COURAGE OF PROFESSIONALISM
A big company is like a mosquito. If you can recognize good startup founders by empathizing with them—if you both resonate at the same frequency—then you may already be a better startup picker than the median professional VC.1 But they're not so advanced as they think; obviously they still view office space as a badge of rank.2 In the real world.3 Let the nerds keep their lunch money, and often win. A survey course in art history may be worthwhile. Really they ought to be out there digging up stories for themselves. A rounds take so long, but at every stage you have a monopoly or cartel to enforce it, and learn a lot about specific, cool problems. The other is that, in a group of other ambitious people.
So you need the kind of productivity that's measured in lines of code: the best programmers are libertarians. It made them hate working for the acquirer. You're going to hit a lot of animals in the wild. A rounds.4 We funded them because we liked the founders so much. But the company as they can in each one. The most important reason for having surprisingly good customer service. For example, one way to do it yourself.
Wealth is what people want.5 This is the tone of someone writing down to their audience. That may not seem surprising. Is it higher in some areas than others? But that isn't true; they are not ordinary people.6 What motivates them? Which means it's doubly important to hire the best people.7 You pick the companies you want to work a lot harder on stuff they like, 2 that the standard office environment is very unproductive, and 3 that bottom-up: people make what they want when they want it, and even then it only works temporarily. I first met him, I thought, these guys are doomed.8 Why not let people spend 100% of their time in a no-man's land, where they're neither working nor having fun. I get close to a deadline. But they underestimated the force of their desire to connect with one another.
It's very dangerous to morale to start to depend on deals closing, not just because they so often work on developing new technology.9 That kind of title is the same sort of reflexive challenge as a whodunit. They give employees who do great work for free, but before the Web it was harder to reach an audience or collaborate on projects. They've tried hard to make their offices less sterile than the usual cube farm. But the real advantage of the ten-man boat shows when you take the ten best rowers out of the way right now.10 Try to keep the sense of a village, but small in the sense of its origins and its semantic core. The three most prominent people I know personally, but it will only get harder, because change is accelerating.11 If you sell your car, you'll get more for it.12 And a lot of trolls in it.
The disadvantage is that it tends not to happen at all. What VCs should be looking for those?13 After barely changing at all for decades, the startup funding business is finally getting some real competition.14 But you don't need to write it in Java. The Suit is Back. If I'm right, then it really pays to keep a company as small as it can be launched. Raising a traditional series A round if you do it? Like rich food, idleness only seems desirable when you don't get much practice at the third skill, deciding what problems to solve.15 As in science, the hard part isn't solving problems, but deciding what problems to solve. You don't pitch stories to them.
A couple years ago a venture capitalist friend told me about a new startup he was involved with. But reporters don't want to bet the company on Betamax.16 There may be a struggle ahead. There are thousands of smart people who could start companies and don't, and with it create a new source of revenue.17 5 commands Don't ignore your dreams; don't work too much; say what you think; cultivate friendships; be happy. To say nothing of idiotic. The toolmakers would have users, but they'd only be the company's own developers.
The traditional board structure after a series A round if you do it? The Suit is Back. The main reason PR firms exist is that reporters are lazy. What's so unnatural about working for a startup is almost always less personal than the rejectee imagines. But the way the story appeared in the press sounded a lot more investments per partner, they have less invested in them.18 Let the nerds keep their lunch money, and often require you to figure out and explain exactly what you disagree with something, it's easier to say you suck than to figure out and explain exactly what you have to make it look like a magazine.19 So difficult that there's probably room to discard more. Maybe some aspects of professionalism are actually a net lose.
Notes
If they're dealing with YC companies that we know nothing about the team or their determination and disarmingly asking the right order. Parker, op. Because it's better if everything just works. Looking at the exact same thing, because they assume readers ignore something they hope this will make grad students' mouths water, but not the bawdy plays acted over on the young Henry VIII and was soon to reap the rewards.
I catch egregiously linkjacked posts I replace the url with that of whatever they copied. We could be done, at one point a competitor added a feature to their kids to be delivering results. Simpler just to steal the company than you otherwise would have gone into the work of selection. What will go away.
I read most things I find hardest to get market price for you. There can be huge.
As Paul Buchheit points out that taking an angel-round board, consisting of two founders and one didn't try because they have to follow redirects, and everyone's used to place orders.
It's unlikely that religion will be weak: things Steve Jobs tried to explain that the path from ideas to startups. While Jessica didn't ask many questions, they have that glazed over look.
I. But this is also to the point of treason.
Horace, Sat. But startups are competitive like running, not where to see.
Anyone can broadcast a high school, and as an animation with multiple frames. So it's worth negotiating anti-dilution, which is a facebook exclusively for college students. We didn't, they thought at least wouldn't be worth about 30 billion.
27 with the bad idea was that it might help to be younger initially we encouraged undergrads to apply, and a few percent from an interview. It should not always as deliberate as its sounds.
It was only because like an undervalued stock in that water a while ago, the more subtle ways in which those considered more elegant consistently came out shorter perhaps after being macroexpanded or compiled. 6 in Chicago, 8 in London, 13 in New York is where product companies go to college somewhere with real research professors.
It seemed better to embrace the fact that established companies can't simply eliminate new competitors may be a hot startup. There is archaeological evidence for large settlements earlier, but Joshua Schachter tells me it was true that the worm infected, because it is very common, but in fact it may be some part you can never tell for sure which these are even worth thinking about for the same price as the love people have told me they like to partners at their firm, the fact that established companies is 47.
Some urban renewal experts took a shot at destroying Boston's in the standard career paths of trustafarians to start a startup. So it's hard to compete directly with open source project, but they can't afford to.
They overshot the available RAM somewhat, causing much inconvenient disk swapping, but those are the numbers like the Segway and Google Wave. I think you should make what they meant. Chop onions and other vegetables and fry in oil, which is where product companies go to college, you'll have less room to avoid becoming an alcoholic. University Press, 1981.
By hiring sufficiently qualified designers. Which is probably part of grasping evolution was to become merely stubborn. Startups that don't raise money after Demo Day. Needless to say yet how much harder to fix once it's big, plus they are in a band, or it would have for endless years of training, and average with the guy who came to mind was one that had been trained that anything hung on a consumer price index created by bolting end to end a series A round about the origins of the Garter and given the freedom to they derive the same energy and honesty that fifteenth century European art.
The bias toward wisdom in ancient philosophy may be that the rest have mostly raised money on Demo Day, there are lots of type II startups neither require nor produce startup culture. It was harder for you to two more investors. I agree.
One possible answer: outsource any job that's not art because it has about the Airbnbs during YC. Without distractions it's too hard at fixing bugs—which is not merely blurry versions of great things were created mainly to make money.
The only reason you're even considering the other direction Y Combinator never negotiates valuations is that it's boring, whereas bad philosophy is worth more, the other becomes visible. The unintended consequence is that when you say something to bad groups and they won't make you expend on the way we met Charlie Cheever sitting near the edge?
Yes, I asked some founders who'd taken series A investor has a spam probabilty of. Corollary: Avoid becoming an administrator, or a 2004 Mercedes S600 sedan 122,000, because a part has come is Secretary of Labor. For example, the light bulb, the same thing 2300 years later Jim Ryun ran a 3 million cap.
If you want to avoid collisions in. Everyone's taught about it.
#automatically generated text#Markov chains#Paul Graham#Python#Patrick Mooney#Notes#science#money#experts#founders#partners#philosophy#rewards#Yes#numbers#couple#url#Jessica#interview#lot#sense#people#honesty#direction#groups#taught#A#projects
0 notes
Text
Explain The New Features In Java 7
There are lots of features introduced by Java 7 in Java programming language and they are trying catch with a resource, String in Switch etc and with the introduction of new file API in Java further there are lots of modifications in Java Development API and apart from that, there are lots minor changes.
1) Permit using String in Switch Case :
In the earlier versions of Java, it was not possible to use String in Switch or a case statement. Since the enum was unveiled in Java 5, the idea for using String in Switch case was present. It was possible to use Enum in Switch case but it is not possible to do the same thing with String. After the entry of JDK 7, String can be used in the Switch case.
Read More : What are the features of Java 7?
2) Various Exception in one catch block :
It is one of the prime features which bags the thought in your mind when listing Java 7 features. There is a possibility to catch multiple Exception in one catch block in JDK 7. In Java 7, it is called as multi-catch block feature. In Exception handling, a significant enhancement called Java 7 has been made as it will decrease the clutter in Exception handling code in Java.
3) Automatic resource management or ARM blocks :
This feature is similar to the ones in previous Java 7 version called as Automatic resource management (ARM blocks) which also implies try with resource block is another important enhancement in the field of Exception handling in Java. Automatic closing of a resource is allowed by ARM blocks eg: Streams, Files, etc which is unveiled inside try block.
Read More : 7 Java Struts Action Framework Features
4) Fork-Join framework in Java 7 :
This feature is mostly asked in the Java interview questions there is a possibility for Fork join framework in Java 7 but it is an individual JSR. In Java 7 it has been included as a new feature to make it part of standard Java 7 core library. Codes can be written with the permission of Fork join and this benefit of multiple cores is present in modern servers.
5) Diamond operator <> for type interface :
Generics in Java are introduced by Java 5 where the programmers are not happy with the verbose and produce duplicate code which is apt due to object creation of para class in Java and you need to give type parameters in both right and left-hand side. A new Java 7 feature called diamond operator <> offers type interference while making Generic class objects. It is possible to get type interference without the Java 7 usage creating Factory method in Java. Type interference can be achieved easily with the help of diamond operator in Java 7.
0 notes