TCS
10+ Adani Ports and SEZ Interview Questions and Answers
Q1. How to share project to client.
The project can be shared with the client through various methods such as email, cloud storage, or version control systems.
Create a build of the project
Upload the build to a cloud storage service such as Dropbox or Google Drive
Share the link to the build with the client
Use a version control system such as Git to share the project with the client
Provide instructions on how to build and run the project
Q2. val sharedPref = activity?.getPreferences(Context.MODE_PRIVATE) ?: return with(sharedPref.edit()){ putInt(getString(R.string.saved_high_score_key), newHighScore) apply() }
The code snippet is used to save a high score in shared preferences in an Android app.
The code checks if the activity is not null before getting the shared preferences.
It then retrieves an editor for the shared preferences to save a new high score.
The new high score is stored using apply() method to save the changes immediately.
Q3. Project starting to end developer process
The developer process for a project involves planning, designing, coding, testing, and deployment.
Plan the project and gather requirements
Design the architecture and user interface
Code the application using best practices and coding standards
Test the application thoroughly to ensure quality and functionality
Deploy the application to the desired platform and monitor its performance
Continuously maintain and update the application as needed
Q4. Wirte code for how to stored data in shared preference
Shared preferences are used to store key-value pairs in Android applications.
Create a SharedPreferences object using getSharedPreferences() method
Use SharedPreferences.Editor to add data to the shared preferences
Commit the changes using apply() or commit() method
Q5. Lifecycle of activity and fragment
The lifecycle of an activity and fragment refers to the series of states they go through during their existence.
Activities and fragments have similar lifecycle methods such as onCreate(), onStart(), onResume(), onPause(), onStop(), and onDestroy().
The lifecycle of a fragment is tied to the lifecycle of its host activity, while an activity can exist independently.
The lifecycle methods of an activity are called before the corresponding methods of its fragments.
The lifecycle of ...read more
Q6. How you learn Android.
I learned Android through online courses, documentation, and practice.
To learn Android, I took online courses on platforms like Udemy and Coursera.
I also read through the official Android documentation to gain a deeper understanding of the framework.
Finally, I practiced building apps on my own and through tutorials to solidify my knowledge.
I also participated in online communities like Stack Overflow to learn from others and ask for help when needed.
Q7. How to check if a number is palindrome?
To check if a number is palindrome, reverse the number and compare it with the original number.
Convert the number to a string to easily reverse it
Reverse the string and compare it with the original string
If they are the same, the number is a palindrome
Q8. How to find smallest number in a list?
To find the smallest number in a list, iterate through the list and keep track of the smallest number found so far.
Iterate through the list and compare each number with the current smallest number.
If a number is smaller than the current smallest number, update the smallest number.
Return the smallest number found after iterating through the entire list.
Q9. Lazy and init meaning.
Lazy refers to delaying the execution of a task until it is actually needed. Init is short for initialization, which is the process of setting up an object or variable before it is used.
Lazy loading is a common technique used in mobile app development to improve performance by only loading data when it is needed.
Init methods are commonly used in object-oriented programming to set up an object's properties or variables before it is used.
Lazy initialization is a combination of ...read more
Q10. Calculate sum of diagonal elements of a matrix
Calculate sum of diagonal elements of a matrix
Iterate through the matrix and add the diagonal elements
Diagonal elements have the same row and column index (i.e. matrix[i][i])
Return the sum of diagonal elements
More about working at TCS
Top HR Questions asked in Adani Ports and SEZ
Interview Process at Adani Ports and SEZ
Top Android Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month