0% found this document useful (0 votes)
7 views

Gmail - Interview!!

Ritika Sandalwar is currently pursuing an online diploma in Computer Applications and has a background in B.C.C.A. She has knowledge of Git, GitHub, and Java, including concepts like version control, platform independence, and object-oriented programming principles. Ritika also briefly discusses algorithms for palindrome checking and generating Fibonacci series.

Uploaded by

ritika sandalwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Gmail - Interview!!

Ritika Sandalwar is currently pursuing an online diploma in Computer Applications and has a background in B.C.C.A. She has knowledge of Git, GitHub, and Java, including concepts like version control, platform independence, and object-oriented programming principles. Ritika also briefly discusses algorithms for palindrome checking and generating Fibonacci series.

Uploaded by

ritika sandalwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Interview!!

1 message

ritika sandalwar <[email protected]> Tue, Jan 7, 2025 at 1:28 PM


To: [email protected]

" Before introducing myself I just want to say that my English is not very strong right now, but I'm working on it. Please.. excuse me if I
make many mistakes or use a little hindi."
Introduction
" • Hi, I'm Ritika Sandalwar. Currently pursuing an online diploma in Computer Applications from STP Computer Education.
• Earlier I completed my first year of B.C.C.A at Dhanwate National College with 8.8 cgpa, but had to drop out due to financial and
documentation issues.
• I've also done certification courses like in Java fundamentals and attended a online bootcamp on HTML and CSS.
• Additionally, I'm little familiar with tools like figma and Git/GitHub.
• Although I had some more courses but they were like primarily for the sake of obtaining certificates rather than gaining in-depth
knowledge."

Git/GitHub

Q. What is git and why do we use it?


- Git is a version control system to track changes like saving history of your project and also collaborate on project.

Q. Difference between Git/GitHub?


- Git is a VCS, while GitHub is an online platform that provide interface to host git repositories.

Q. Git repository?
- A folder where all changes are saved.
: Like if we had a folder named project and we made some changes in it like adding some files or deleting so the .git folder in that
project folder will pick it up all the changes that were made will be in git repository.

Q. How do you create a new branch in git? Why is it important?


- Use 'git branch branch_name' and switch with 'git checkout branch_name'.
- Branches separate tasks to avoid affecting the main code base.

Q. How do you check the status of your repository?


- Use 'git status' to check for changes and the current branch.

Q. What command is used to push changes to a remote repository?


- Use 'git push origin branch_name' to push changes.

Q. How do you resolve merge conflicts?


- Fix conflicts manually, stage changes with git add, and finish with git commit.

Q. How do you initialize a Git repository?


- Use `git init` to initialize an empty repository.

Q. How do you check the changes in your project?


- Use `git status` to see untracked or modified files.

Q. How do you stage and commit changes?


- Stage with `git add` and commit with `git commit -m "message" '.

Q. How do you clone a repository?


- Use `git clone repository_url` to copy a repository to your local machine.

Q. How do you create and switch to a new branch?


- Create with `git branch branch_name` and switch with `git checkout branch_name`.

Q. How do you push changes to a repository?


- Use `git push origin branch_name`.

Q. How do you fetch updates from the remote repository?


- Use `git fetch` or `git pull` to get updates.
Q.How do you remove a commit?
- Use `git reset commit_hash`.

Q. How do you view the history of changes?


- Use `git log`.

Q. How do you resolve merge conflicts?


- Fix the file manually, stage it, and commit.

Java

Q.How does Java code execute?


- Java code (.java file) is compiled into bytecode (.class file).
JVM interprets bytecode to machine code for execution.

Q. What makes Java platform-independent?


- Bytecode can run on any system with JVM, making Java platform-independent. It is Write once run anywhere.

Q. What is the difference between JDK, JRE, and JVM?


- JDK: Develops and runs programs (includes JRE and tools).
JRE: Runs programs (includes JVM).
JVM: Executes bytecode.

Q. What is JIT in Java?


- JIT (Just-In-Time compiler) converts frequently used bytecode to machine code for faster execution.

Q. What happens during runtime in JVM?


- Class Loader loads classes.
Bytecode verifier checks the code.
Interpreter and JIT execute the code.

Q. How does the compiler help in Java?


- Javac the compiler converts source code (.java) to bytecode (.class).

Q. What are the steps of JVM execution?


- Loading: Reads bytecode.
Linking: Allocates memory.
Initialization: Assigns values and runs static blocks.

Q. What is class?
- A class is a blueprint or template for creating objects. It defines the structure and behavior of the objects by specifying their
properties and functions.

Q. What is an object?
- An instance of a class.

Q. Garbage Collection?
- It's an automatic process of removing objects with no reference variable.

Q. Four pillars of OOP?


- Encapsulation: Binding data and methods, restricting access using access modifiers.

Inheritance : Reusing code by deriving one class from another. Letting the child class reuse the features of parent class.

Polymorphism : Using one method in multiple ways, like having the same function name but doing different things.

Abstraction : Hiding implementation details, showing only essential features.

Palindrome
- It's a string that reads the same forward and backward, such as "radar" or "level" etc.
I don't know how to write it in java but I had seen the algorithm of it somewhere it goes like this :
Algorithm:
Read the input string.
Reverse the string.
Compare the original string with the reversed string:
If they are the same, it is a palindrome.
Otherwise, it is not a palindrome.

Fibonacci
- The Fibonacci series starts with 0 and 1. Each number in the series is the sum of the previous two numbers.
In the program:
- We start with `first = 0` and `second = 1`.
- We use a loop to calculate the next number as `first + second`.
- Then, we update `first` and `second` for the next calculation.
• The program repeats this process for the number of terms specified by the user and prints the series.

You might also like