TCS JAVA Real Interview by TCS Team for fresher , TCS Interview Preparation By TCS Team

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 เม.ย. 2022

ความคิดเห็น • 193

  • @errollaabhishek315
    @errollaabhishek315 2 ปีที่แล้ว +826

    Interviewer Roshni has a smiling face. This makes the candidate feel comfortable and answer the questions.

  • @dheerajkoranga5012
    @dheerajkoranga5012 หลายเดือนก่อน +13

    What concept in Java makes it "write once, run anywhere"?
    The concept in Java that makes it "write once, run anywhere" is the Java Virtual Machine (JVM). Java programs are compiled into bytecode, which is platform-independent. The JVM interprets this bytecode and runs it on any device or operating system that has a compatible JVM implementation.
    Can we run a Java program without a main method?
    No, we can't run java program without a main method because the main method is the entry point of java program if main method is not present in the program then it will throw compilation error indication no main method is found
    Difference between JRE and JDK
    - **JRE (Java Runtime Environment):** It is a package of tools necessary to run Java programs. It includes the JVM, core libraries, and other components required to run applications written in Java.

    - **JDK (Java Development Kit):** It is a superset of the JRE, containing everything in the JRE plus tools for developing Java applications, such as the compiler (`javac`), debuggers, and other development tools.
    What is a wrapper class?
    A wrapper class in Java provides a way to use primitive data types (int, char, etc.) as objects. Each primitive data type has a corresponding wrapper class:
    - int -> Integer
    - char -> Character
    - boolean -> Boolean
    - etc.
    Wrapper classes are used for converting primitives to objects and vice versa, which is especially useful in situations where objects are required, such as in collections.
    What will happen if we do not write `static` with the main method?
    If the `main` method is not declared `static`, the JVM will not be able to call it at the start of the program. This is because the `main` method is the entry point of the program and is called without creating an instance of the class. Declaring `main` as `static` allows the JVM to call it directly using the class name.
    Can we have multiple main methods in Java?
    Yes, you can write multiple main methods in Java. But, only one main method with a parameter as String[] args will be executed by the JVM.
    The main method is the entry point of a Java program. It is the method that is called when the program is executed. The main method must be declared public static void main(String[] args).
    If you have multiple main methods in your program, only the one with the correct signature will be executed. The other main methods will be ignored
    What is method overloading?
    Method overloading in Java is a feature that allows a class to have more than one method with the same name, but different parameter lists (different type, number, or both). The appropriate method is selected based on the method signature at compile-time.
    Can we have multiple catch blocks with a single try block?
    Yes, you can have multiple catch blocks with a single try block in Java. Each catch block can handle a different type of exception. The first catch block with a matching exception type is executed.
    ```java
    try {
    // code that may throw an exception
    } catch (IOException e) {
    // handle IOException
    } catch (SQLException e) {
    // handle SQLException
    } catch (Exception e) {
    // handle any other exceptions
    }
    ```
    Difference between array and ArrayList
    - **Array:**
    - Fixed size: Once created, the size cannot be changed.
    - Can hold primitive types and objects.
    - Not part of the Java Collections Framework.
    - **ArrayList:**
    - Dynamic size: Can grow and shrink as needed.
    - Can only hold objects (wrapper classes for primitives).
    - Part of the Java Collections Framework and provides more functionality, like dynamic resizing and methods for manipulation.
    Why is Map not considered a Collection?
    In Java, the `Map` interface is not a part of the `Collection` hierarchy. While `Collection` is a root interface for collections like `List`, `Set`, and `Queue`, `Map` is designed to store key-value pairs and thus does not fit into the `Collection` interface's structure, which is more suited for single elements. The `Map` interface has a different structure and methods tailored for key-value associations rather than individual elements.

  • @surajsinghadhikari3324
    @surajsinghadhikari3324 ปีที่แล้ว +48

    Nowadays they expect spring, spring boot,hibernate and microservices knowledge from a fresher. They are not even shortlisting resumes of those who only knows core java.

  • @Harsit18
    @Harsit18 ปีที่แล้ว +57

    1.Jdk is a software where as jvm is virtual mechine which is compile the code, inside jdk software there is jvm
    2. Yes we can use more than 1 main method but jvm only execute that main method which has String arg[]

    • @Kumbutranjaami
      @Kumbutranjaami 11 หลายเดือนก่อน +5

      JVM won't compile any code. It executes compiled code.

    • @nationfirst640
      @nationfirst640 10 หลายเดือนก่อน

      ​​​@@Kumbutranjaamiit's compiler like Javac present in jdk that compile the code

    • @Kumbutranjaami
      @Kumbutranjaami 10 หลายเดือนก่อน

      @@nationfirst640 Right. That's what I said too. The original comment says ".....JVM is virtual mechine which is compile the code..." and I corrected it, because that's wrong.

    • @nationfirst640
      @nationfirst640 10 หลายเดือนก่อน

      @@Kumbutranjaami you're right bro,you said it right, I just said mentioned about javac , that's it.

    • @Kumbutranjaami
      @Kumbutranjaami 10 หลายเดือนก่อน

      @@nationfirst640 I don't want to disappoint you. "Yes. I am the best developer in this entire universe. You are all subordinates to me. You should listen whatever I said to you."

  • @danielpaulinomesquitaene6984
    @danielpaulinomesquitaene6984 ปีที่แล้ว +31

    The Roshni is very simpatic, She make this interview more easy.

  • @nikhilnimbalkar9403
    @nikhilnimbalkar9403 ปีที่แล้ว +47

    Subclass exception type should be defined first that means in first catch block we have to define Arithmetic exception and in the next catch block we have to define superclass exception type that we can say like
    try{
    Exception causing statements
    }
    catch(ArithmeticExc.. e)
    {
    Sopl("handled");
    }
    catch(Exception e)
    {
    Sopl("Exception handled");
    }
    Once the exception handled control doesn't go back to try block to check remaining statements. Statements after exception handling mechanisms will then get executed.

    • @ColorsByBala
      @ColorsByBala ปีที่แล้ว

      Agreed

    • @humtum4484
      @humtum4484 ปีที่แล้ว

      in that case Exception block will handle the exception first

    • @chinmaynayak8645
      @chinmaynayak8645 ปีที่แล้ว

      @@humtum4484 yes this will show a error at compile time that ArithmeticException has been caught.😊

  • @nikhilnimbalkar9403
    @nikhilnimbalkar9403 ปีที่แล้ว +27

    If we have to store homogeneous objects or fixed size we can prefer array and opposite of that if we want to store heterogenous object with dynamic content we can use arraylist.

    • @franciscov511
      @franciscov511 ปีที่แล้ว

      you can also store heterogenous in an array and do same things like in a collection, taking about objects

  • @sangulakshetty9857
    @sangulakshetty9857 ปีที่แล้ว +42

    These kinds of mock interviews will help to students.

  • @aartisharma7898
    @aartisharma7898 ปีที่แล้ว +2

    Array doesn't based on Some standard data structures,so predefine method support not present in case of arrays like Arraylist have .....Array is type safe and faster then Arraylist...

  • @bunny_rabbit5753
    @bunny_rabbit5753 2 ปีที่แล้ว +34

    Channel name itself 😍 xplains a lot

    • @chayanjana20
      @chayanjana20 2 ปีที่แล้ว

      They can take common of the repeating name... 😀😀😀😀

  • @sujoymanna3071
    @sujoymanna3071 ปีที่แล้ว +5

    4 questions.= answer is besically try and catch block exception handling

  • @Abraham33286
    @Abraham33286 11 หลายเดือนก่อน +9

    static in method means you don't have to create object to call main method. main method automatically will call, when you run the program.

  • @shadow_man4279
    @shadow_man4279 ปีที่แล้ว +29

    I felt that am only taking interview ✨
    Nice interview... And it's more practical...
    Roshni😍maam smiling face building confidence for opposite person

  • @harshthakur1159
    @harshthakur1159 ปีที่แล้ว +6

    Roshni smile makes also feel free

  • @DinemoGamingl
    @DinemoGamingl ปีที่แล้ว +2

    Thanks for your help 🙂👍👍👍👍👍

  • @tsdwdemon4964
    @tsdwdemon4964 ปีที่แล้ว +24

    Wrapper class converts primitive datatype into OOP

  • @WebMaster600
    @WebMaster600 ปีที่แล้ว +6

    JVM only run one main method which contains argument as string array

  • @surajprajapati7027
    @surajprajapati7027 2 ปีที่แล้ว +117

    i know each and every answer she asked with perfect example

    • @randomanimememes2685
      @randomanimememes2685 2 ปีที่แล้ว +13

      you are getting the job let me hire you

    • @surajprajapati7027
      @surajprajapati7027 2 ปีที่แล้ว

      @@randomanimememes2685 for which post ?

    • @mithunmoparthi906
      @mithunmoparthi906 2 ปีที่แล้ว +21

      @@surajprajapati7027 for proxies…..😂😂😂

    • @ujjwalsharma772
      @ujjwalsharma772 2 ปีที่แล้ว

      We can hire you .....but along with java you atleast must have 30 years of programming experience in dart, php, python, javascript, typescript with no expectations......you must have a really high knowledge in AWS, firebase
      Along with it you must have advance knowledge about mysql, all the nosql's available in the market, cloud databases, and relational databases
      You must have a deep knowledge and atleast around 400 projects with frameworks like react, flutter, django, flask, express
      You must know how to handle a large Team with a members of only you(as we are short on staff), when we provide you 30 projects together
      If you think you are capable on working under these conditions....we are happy to hire you with a monthly salary of 5000
      Feel free to contact us

    • @azhagupandianr9071
      @azhagupandianr9071 ปีที่แล้ว

      Number please

  • @nagellikiran22
    @nagellikiran22 ปีที่แล้ว +2

    The interviewer always smile like she put a difficult question and let's see how he gonna answer it

  • @siri1791
    @siri1791 2 ปีที่แล้ว +5

    Tq u this is helpfull for all

  • @aryanmaheshwari1006
    @aryanmaheshwari1006 2 ปีที่แล้ว +73

    After listening this...i can feel like clear this round . 😂😂.. easy questions

    • @darklord9500
      @darklord9500 2 ปีที่แล้ว +4

      Yes bro, I also feel like that

    • @Artified00
      @Artified00 ปีที่แล้ว +11

      I feel like its scripted means he dosnt look fresher 😅

    • @darklord9500
      @darklord9500 ปีที่แล้ว

      @@Artified00 😂

    • @technicalgamingandroid3208
      @technicalgamingandroid3208 ปีที่แล้ว +1

      @@Artified00 it's not like that, he was confident, if he didn't knew the answer also he seemed confident

    • @yuvraj_jadhav_.
      @yuvraj_jadhav_. ปีที่แล้ว +1

      @@Artified00 it is a mock interview. He is a senior at tcs already

  • @Dark2115azazel
    @Dark2115azazel ปีที่แล้ว +10

    We can run java code without using main method by using static block which runs only once when class is loaded in to the meory

    • @shivammallik2359
      @shivammallik2359 ปีที่แล้ว

      not now in earlier version we can run without main

    • @sujitbhoi0206
      @sujitbhoi0206 ปีที่แล้ว

      But it was possible the previous version

  • @sirigidivasu3567
    @sirigidivasu3567 5 หลายเดือนก่อน

    In stand alone applications main method is required, but in web or enterprise application which is not required because the whole execution will depend on web server we use

  • @ashwinajmery6071
    @ashwinajmery6071 2 ปีที่แล้ว +10

    After asking every question.. madam smiling 😀❤️

    • @GDPI
      @GDPI ปีที่แล้ว

      Smiling

  • @unwanted0078
    @unwanted0078 ปีที่แล้ว +55

    Most of the interviews are nowhere as easy as this one is, don't be fooled.

    • @rani_meow
      @rani_meow ปีที่แล้ว +2

      Yes... How come it is so easy 😂

    • @hardtrailrider
      @hardtrailrider ปีที่แล้ว

      most of the answers are like this dumb..

    • @Neerajkushwaha-uz8wo
      @Neerajkushwaha-uz8wo ปีที่แล้ว +8

      Actually she has made her mind to reject him. Thats why she thought why to waste more time 😅

    • @Momentumunboun
      @Momentumunboun ปีที่แล้ว +5

      One interview I did, by the end I had literally created an app for the company. I didn't get the job but I found out that they took the app and made millions of dollars from it. 😄

    • @victoriavincent3811
      @victoriavincent3811 ปีที่แล้ว

      ​@@Neerajkushwaha-uz8wobut how did you came with conclusion that she wanted to reject him

  • @kirano07
    @kirano07 2 ปีที่แล้ว +27

    Thank you for making such kind of video,this is not real but it's good

    • @jayantpawar8141
      @jayantpawar8141 2 ปีที่แล้ว

      I think this ia real i searched her on LinkedIn and she really work in tata elxsi as a senior manager.

  • @VIJAY-ZARKAR
    @VIJAY-ZARKAR ปีที่แล้ว +2

    If any relation between exception then child class exception should write in upper and parent class should write lower otherwise it will give COMPILE ERROR...

    • @sheshanksidheshwar9846
      @sheshanksidheshwar9846 ปีที่แล้ว

      actually its arraylist not error list as captions heard it wrong

  • @_rahulkumarofficial
    @_rahulkumarofficial ปีที่แล้ว +2

    Main m static isliye chahiye kyunki we can't create object of that and we need static keyword so that we can invoke main method.

  • @syedfahim6652
    @syedfahim6652 ปีที่แล้ว +4

    I am just focusing on java interview questions for selenium interview to crack

  • @sridharlanka2721
    @sridharlanka2721 2 ปีที่แล้ว +31

    10:00
    case1 -
    ---------
    If the Superclass is mentioned in the 1st catch block and ArithmeticException is defined in the 2nd catch block
    Result - CE :
    exception ArithmeticException has already been caught
    catch(ArithmeticException ae)
    ==============================================
    case2 -
    -----------
    If the Superclass is mentioned in the 2nd catch block and ArithmeticException is defined in the 1st catch block
    Result: No CE Error
    Just the statements mentioned in the ArithmeticException of the 1st catch block will be matched and executed

    • @basuchouri324
      @basuchouri324 ปีที่แล้ว

      This concept comes in advance java? Please tell me.

    • @sridharlanka2721
      @sridharlanka2721 ปีที่แล้ว +1

      @@basuchouri324 not sure , but I learned as part of J2SE (core Java)

  • @ranikumari9883
    @ranikumari9883 2 ปีที่แล้ว +2

    kash har interviewer mam jaise ho

  • @AshishKumar-lj4jv
    @AshishKumar-lj4jv ปีที่แล้ว +24

    If you share his resume here , it will be helpful.

  • @LIN30Sec
    @LIN30Sec ปีที่แล้ว +2

    What if we use static block over main method it will execute it

  • @RajeshKumar-ck8zf
    @RajeshKumar-ck8zf ปีที่แล้ว +2

    We can run Java program without main method before Java 7.

  • @visionforhumansociety8990
    @visionforhumansociety8990 2 ปีที่แล้ว +6

    Very nice interview with smily faces😂

  • @beesetti.d.ssubhash5075
    @beesetti.d.ssubhash5075 ปีที่แล้ว +76

    This interview was an expectation but reality is different😂

    • @rowdy9046
      @rowdy9046 ปีที่แล้ว +1

      Yup bro 🤣

    • @kingkohlidevote8075
      @kingkohlidevote8075 ปีที่แล้ว +4

      Is the real one is tough than this?....

    • @parameshiyer6065
      @parameshiyer6065 ปีที่แล้ว +5

      Haha 😂 obviously!! This is the way these TH-camrs make money

    • @chiragdusad2015
      @chiragdusad2015 ปีที่แล้ว +5

      @@parameshiyer6065 this is tcs not a product based company who asks u regarding DSA so yeah it is the almost same interview expected by tcs

    • @mohammedmujaheed8501
      @mohammedmujaheed8501 ปีที่แล้ว

      could you elaborate and tell me which type of question we can expect as a fresher in an interview?

  • @White-Devil516
    @White-Devil516 ปีที่แล้ว +21

    I selected in wipro on phase 2... And i had completed my graduation this year 2022.. And i have 6.29cgpa...now am i eligible for wipro🥺🥺🥺

    • @abhilashkghebbar1673
      @abhilashkghebbar1673 ปีที่แล้ว

      yes you are but they don't onboarding freshers cause of recession it may take upto 4 months to onboard freshers if you are selected to wipro elite. all the best

    • @prachigedam2909
      @prachigedam2909 ปีที่แล้ว

      Hey ....how u did it can u help me..

    • @tsunium2662
      @tsunium2662 ปีที่แล้ว

      don't join wipro

    • @1andonly_amit
      @1andonly_amit ปีที่แล้ว

      cse or btech or bca ?

    • @0qwerty10
      @0qwerty10 ปีที่แล้ว

      @@tsunium2662 why.?

  • @korlakuntanagendrababu2432
    @korlakuntanagendrababu2432 2 ปีที่แล้ว +6

    Nice discussion

  • @nigambisen3194
    @nigambisen3194 ปีที่แล้ว +25

    Can we overload main method?
    Yes We can overload main method by changing its formal arguments.

    • @sumitp9158
      @sumitp9158 ปีที่แล้ว +2

      yes we can overload main method but jvm calls main method with (string args[]) only

    • @ppriyansh2327
      @ppriyansh2327 ปีที่แล้ว

      Yes

  • @tlnvenkat
    @tlnvenkat ปีที่แล้ว

    Interviewer roshni mam face was very likely and very interested to say answers by seeing mam

  • @puneetvohra847
    @puneetvohra847 ปีที่แล้ว

    👍👍

  • @saiharinath2582
    @saiharinath2582 ปีที่แล้ว +11

    looks like he is not a fresher ....!!!his age is far than fresher ..i think soo...

  • @path_of_peace
    @path_of_peace ปีที่แล้ว +9

    Problem with me is that .. if you give me a question i could solve it easily .. but can't explain it in English ...

  • @ashokreddy2982
    @ashokreddy2982 ปีที่แล้ว

    His eye contact is not that great...i used to be like him...but later i improved my eye contact...but his communication skills and knowledge is good 👌🏻

  • @Basha__15
    @Basha__15 ปีที่แล้ว +3

    He looks experienced guy but questions are very basic level.

  • @rutx7ck.11
    @rutx7ck.11 ปีที่แล้ว +4

    wrapper class wraps around data data type and give it an form of object, the preemptive data type cant be wrap because they do not belong to any class

  • @reverseswing8649
    @reverseswing8649 ปีที่แล้ว +5

    It seems that I have gone through your resume 😂 Typical Indian Software Engineer English 😂

  • @smile-bi8ng
    @smile-bi8ng ปีที่แล้ว

    Exception da

  • @ayushisharma8088
    @ayushisharma8088 2 ปีที่แล้ว +14

    Could we get videos of tcs digital interviews???

  • @kausiksantra4493
    @kausiksantra4493 ปีที่แล้ว

    His answer is perfect

  • @harinis6234
    @harinis6234 2 ปีที่แล้ว +4

    One or two methods same object,but different values

  • @ASIVASAIATCHYUT
    @ASIVASAIATCHYUT 2 ปีที่แล้ว +8

    is it for ninja role or digital role??

  • @krish1670
    @krish1670 ปีที่แล้ว +2

    Is this ninja or digital ?

  • @codex7065
    @codex7065 2 ปีที่แล้ว +12

    I can give answer for all this question but still I could not able to crack any interview for java development. Very sad

  • @ronitbhandari2928
    @ronitbhandari2928 ปีที่แล้ว +17

    Being a mechanical engineer I can answer all this questions

  • @techgana1663
    @techgana1663 2 ปีที่แล้ว +8

    Jvm Jdk java vartual machine/ java development kit ♥️

  • @shantanughumatkar3505
    @shantanughumatkar3505 ปีที่แล้ว +2

    Why is he unable to give a simple answer?
    It was a basic level answer

  • @3227sonu
    @3227sonu หลายเดือนก่อน

    Jsp and servlet is no more used in the industry almost dead, its time of AI,jdk.11,spring boot, kafka,Angular and microservices etc. lockdown questions are very basic and even ppl got seleted

  • @shubhambhamare7551
    @shubhambhamare7551 ปีที่แล้ว +8

    can somebody comment the y=10/0 question as how it would have been presented/written if it was a code.

    • @purplewolf3769
      @purplewolf3769 ปีที่แล้ว

      we must pass a try and catch exception in our code.
      For example,
      a = 10;
      b = 5;
      c = 5;
      result = a/(b-c);
      The result is not possible since nothing can be divided by zero. So we need to write a catch statement calling the ArithmeticException so it can just skip the result when the denominator gets 0.

    • @rexkrish3852
      @rexkrish3852 ปีที่แล้ว +2

      @@purplewolf3769 it should be a/(b-c)

    • @purplewolf3769
      @purplewolf3769 ปีที่แล้ว

      @@rexkrish3852 oops.. TYPO

    • @SoloSoul69
      @SoloSoul69 ปีที่แล้ว +2

      Runtime error is the keyword

    • @cocadoodledoo6346
      @cocadoodledoo6346 10 หลายเดือนก่อน

      ​@@purplewolf3769then fix it blud. 😅

  • @VinaySharma-xq6nw
    @VinaySharma-xq6nw ปีที่แล้ว +2

    No need of any more interview anyways we have chatgpt now

  • @sayanchakraborty307
    @sayanchakraborty307 2 ปีที่แล้ว +2

    is this ninja or digital interview?

  • @reshmasalian2394
    @reshmasalian2394 ปีที่แล้ว +2

    Can I give the interview

  • @iroshanz_
    @iroshanz_ 3 หลายเดือนก่อน

    Wrapper class

  • @SaleemKhan-fr7pr
    @SaleemKhan-fr7pr ปีที่แล้ว +1

    Itna aasan interview kon leta h bhai....Sab jhut hai..Sab moh maya hai

  • @14yogeshkumar99
    @14yogeshkumar99 2 ปีที่แล้ว +15

    is that off campus interview?

    • @SumanRoy.official
      @SumanRoy.official 2 ปีที่แล้ว +9

      Doesn't matter, follow up with the questions it will help

    • @14yogeshkumar99
      @14yogeshkumar99 2 ปีที่แล้ว

      @@SumanRoy.official asking bcoz we dont have campus placements , also companies like TCS dont come in our collage.

    • @tusharpal3731
      @tusharpal3731 2 ปีที่แล้ว

      Ya it’s an off campus

    • @sandeeprn6959
      @sandeeprn6959 2 ปีที่แล้ว +4

      Script broi

    • @14yogeshkumar99
      @14yogeshkumar99 2 ปีที่แล้ว +2

      @@sandeeprn6959 yeh its sounds like ..

  • @harinis6234
    @harinis6234 2 ปีที่แล้ว

    If statement

  • @harinis6234
    @harinis6234 2 ปีที่แล้ว +1

    Void

  • @evergame2443
    @evergame2443 2 ปีที่แล้ว +31

    In tino me se freser kon lagra

  • @anirbanmanna2897
    @anirbanmanna2897 2 ปีที่แล้ว +29

    Scripted

    • @nidhin3375
      @nidhin3375 2 ปีที่แล้ว

      I dont think so

    • @mayanksom4776
      @mayanksom4776 2 ปีที่แล้ว +2

      Vishal Barad is the head of TCS Xplore 😂 that's enough to tell you

    • @biswajitbeheraCrAzYLoVeR
      @biswajitbeheraCrAzYLoVeR 2 ปีที่แล้ว +1

      correct...it's just for educational purposes....i have seen a similar SQL interview where Vishal was the interviewer and the candidate was someone else

  • @MrBasant1986
    @MrBasant1986 2 ปีที่แล้ว +22

    Is that joke

  • @vaishnavisridhar3627
    @vaishnavisridhar3627 ปีที่แล้ว +2

    Is he fresher?

    • @pawantembhurne6828
      @pawantembhurne6828 ปีที่แล้ว +5

      Yes... But at looking him anybody can say he completed his graduations 10 years before...

    • @yashmistry934
      @yashmistry934 ปีที่แล้ว

      @@pawantembhurne6828 this is not a real interview it's just a demo of how it is

  • @SharmaAchal
    @SharmaAchal ปีที่แล้ว +5

    System.out.print("Thank you");