true

Find the best tutors and institutes for BTech Tuition

Find Best BTech Tuition

Please select a Category.

Please select a Locality.

No matching category found.

No matching Locality found.

Outside India?

Search for topics

BTech Tuition Updates

Ask a Question

Post a Lesson

All

All

Lessons

Discussion

Lesson Posted on 10/12/2019 Tuition/BTech Tuition/Java Programming

What Is Object Oriented Language And Benefits Of OOPS?

Tasneem

Object-Oriented Language:The real entities in this world can be defined as objects. They can be like a tree, fan, tv etc. The language which describes the behaviour of such kind of objects is known as OOPS.It mainly defines two aspects:1. Classes: Class can be defined as a collection of objects having... read more

Object-Oriented Language:
The real entities in this world can be defined as objects. They can be like a tree, fan, tv etc. The language which describes the behaviour of such kind of objects is known as OOPS.
It mainly defines two aspects:
1. Classes: Class can be defined as a collection of objects having the same kind of behaviour.
2. Objects: It is a real-time entity.
The concepts pertaining to the oops are:
1. Inheritance: It is the resemblance of parent class characteristics to the child class.
2. Abstraction: It is only revealing the exact information and hiding unnecessary data.
3. Polymorphism: It is defined as many forms :
a. Overloading.
b. Overriding.
4. Encapsulation: It has the protection to the data that could be given by access specifiers.

read less
Comments
Dislike Bookmark

Lesson Posted on 07/02/2018 IT Courses/Java IT Courses/Java Script Training Tuition/BCA Tuition/Java Programming +3 Tuition/BTech Tuition/Java Programming Tuition/Engineering Diploma Tuition/Java Programming IT Courses/Java/Core Java less

Java Interview Questions & Answers

Dev Group

Dev Group provides an in-depth IT & accounts training in Delhi. All the courses and training classes...

Java Interview Questions have been designed especially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Java Programming Language. As per my experience, good interviewers hardly planned to ask any particular question during your interview,... read more

Java Interview Questions have been designed especially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Java Programming Language. As per my experience, good interviewers hardly planned to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer.

Q 1. What do you know about Java?

Ans. Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.

Q 2. What are the supported platforms by Java Programming Language?

Ans. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX/Linux like HP-Unix, Sun Solaris, Redhat Linux, Ubuntu, CentOS, etc.

Ans. Some features include Object Oriented, Platform Independent, Robust, Interpreted, Multi-threaded.

Ans. It’s compiler generates an architecture-neutral object file format, which makes the compiled code to be executable on many processors, with the presence of Java runtime system.

Ans. Java uses Just-In-Time compiler to enable high performance. Just-In-Time compiler is a program that turns Java bytecode, which is a program that contains instructions that must be interpreted into instructions that can be sent directly to the processor.

Ans. It is designed to adapt to an evolving environment. Java programs can carry extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.

Ans. When Java is compiled, it is not compiled into platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by virtual Machine (JVM) on whichever platform it is being run.
Q 8. List two Java IDE’s.

Ans. Netbeans, Eclipse, etc.

Q.9. List some Java keywords(unlike C, C++ keywords).

Ans. Some Java keywords are import, super, finally, etc.

Ans. Object is a runtime entity and it’s state is stored in fields and behavior is shown via methods. Methods operate on an object's internal state and serve as the primary mechanism for object-to-object communication.

Q11. Define class.

Ans. A class is a blue print from which individual objects are created. A class can contain fields and methods to describe the behavior of an object.

Ans. A class consist of Local variable, instance variables and class variables.

Ans. Variables defined inside methods, constructors or blocks are called local variables. The variable will be declared and initialized within the method and it will be destroyed when the method has completed.

Ans. Instance variables are variables within a class but outside any method. These variables are instantiated when the class is loaded.

read less
Comments
Dislike Bookmark

Lesson Posted on 07/02/2018 IT Courses/Java Tuition/BTech Tuition/Java Programming IT Courses/Java/Core Java +2 Tuition/BCA Tuition/Java Programming Tuition/Engineering Diploma Tuition/Java Programming less

What Is Java? Explain The History Of Java

Dev Group

Dev Group provides an in-depth IT & accounts training in Delhi. All the courses and training classes...

i. Ovierview: Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 ). The latest release of the Java Standard Edition is Java SE 8. With the advancement of Java... read more

i. Ovierview: Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).

The latest release of the Java Standard Edition is Java SE 8. With the advancement of Java and its widespread popularity, multiple configurations were built to suit various types of platforms. For example: J2EE for Enterprise Applications, J2ME for Mobile Applications.

The new J2 versions were renamed as Java SE, Java EE, and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere.

 

ii. Java:

• Object Oriented: In Java, everything is an Object. Java can be easily extended since it is based on the Object model.

• Platform Independent: Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by the Virtual Machine (JVM) on whichever platform it is being run on.

• Simple: Java is designed to be easy to learn. If you understand the basic concept of OOP Java, it would be easy to master.

• Secure: With Java's secure feature it enables to develop virus-free, tamper-free systems. Authentication techniques are based on public-key encryption.

• Architecture-neutral: Java compiler generates an architecture-neutral object file format, which makes the compiled code executable on many processors, with the presence of Java runtime system.

• Portable: Being architecture-neutral and having no implementation dependent aspects of the specification makes Java portable. Compiler in Java is written in ANSI C with a clean portability boundary, which is a POSIX subset.

• Robust: Java makes an effort to eliminate error prone situations by emphasizing mainly on compile time error checking and runtime checking.

• Multithreaded: With Java's multithreaded feature it is possible to write programs that can perform many tasks simultaneously. This design feature allows the developers to construct interactive applications that can run smoothly.

• Interpreted: Java byte code is translated on the fly to native machine instructions and is not stored anywhere. The development process is more rapid and analytical since the linking is an incremental and light-weight process.

• High Performance: With the use of Just-In-Time compilers, Java enables high performance.

• Distributed: Java is designed for the distributed environment of the internet.

• Dynamic: Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.

 

iii. History of Java:

James Gosling initiated Java language project in June 1991 for use in one of his many set-top box projects. The language, initially called ‘Oak’ after an oak tree that stood outside Gosling's office, also went by the name ‘Green’ and ended up later being renamed as Java, from a list of random words.

Sun released the first public implementation as Java 1.0 in 1995. It promised Write Once, Run Anywhere (WORA), providing no-cost run-times on popular platforms.

On 13 November, 2006, Sun released much of Java as free and open source software under the terms of the GNU General Public License (GPL).

On 8 May, 2007, Sun finished the process, making all of Java's core code free and open-source, aside from a small portion of code to which Sun did not hold the copyright.

read less
Comments
Dislike Bookmark

Looking for BTech Tuition

Find best BTech Tuition in your locality on UrbanPro.

FIND NOW

Asked on 27/08/2017 Tuition/BTech Tuition/Java Programming

What is serialization in Java?

Answer

Lesson Posted on 29/05/2017 IT Courses/Java Tuition/BTech Tuition Tuition/BTech Tuition/Java Programming +3 Tuition/BCA Tuition Tuition/BCA Tuition/Java Programming Java Certification Classes less

Finding a Majority Element

Paras Chawla

Working as a Senior Software Developer(R and D) in the following technologies. 1. Java 2. J2EE/J2ME 3....

Problem Description Task. The goal in this code problem is to check whether an input sequence contains a majority element. Input Format. The first line contains an integer, the next one contains a sequence of non-negative integers 0, 1, . . . ,−1. Constraints. 1 ≤ ?? ≤ 10^5 ; 0 ≤ ????... read more

Problem Description Task.

The goal in this code problem is to check whether an input sequence contains a majority element.

Input Format. The first line contains an integer, the next one contains a sequence of non-negative integers 0, 1, . . . ,−1. Constraints. 1 ≤ ?? ≤ 10^5 ; 0 ≤ ???? ≤ 10^9 for all 0 ≤ ?? < ??.

Output Format. Output 1 if the sequence contains an element that appears strictly more than??/2 times, and 0 otherwise.

Pseudo code

findCandidate(a[], size)

  1. Initialize index and count of majority element

     maj_index = 0, count = 1

  1. Loop for i = 1 to size – 1

    (a) If a[maj_index] == a[i]

          count++

    (b) Else

        count--;

    (c) If count == 0

          maj_index = i;

          count = 1

  1. Return a[maj_index]

 

Java Code

import java.util.Scanner;

 

// Moore - Voting algorithm . Run-time complexity O(n)

public class MajorityElement {

     public static void main(String[] args) {

           Scanner scan = new Scanner(System.in);

           int n = scan.nextInt();

           long array[] = new long[n];

           for (int i = 0; i < n; i++)

                array[i] = scan.nextLong();

           long candidate = findCandidate(array, n);

           System.out.println(candidate);

           int count = 0;

           for (int i = 0; i < n; i++)

                if (array[i] == candidate)

                     count++;

           if (count > (n / 2))

                System.out.println("1");

           else

                System.out.println("0");

     }

 

     static long findCandidate(long array[], int n) {

           int index = 0;

           long count = 1;

           for (int i = 1; i < n; i++) {

                if (array[index] == array[i])

                     count++;

                else

                     count--;

                if (count == 0)

                     {index = i;

                      count = 1;}

           }

           return array[index];

     }

}

 

Output:

10

2 124554847 2 941795895 2 2 2 2 792755190 756617003

 

2

 

1

read less
Comments
Dislike Bookmark

Lesson Posted on 13/05/2017 Tuition/BA Tuition/Programming in JAVA Tuition/BTech Tuition Tuition/BTech Tuition/Java Programming +4 Tuition/Engineering Diploma Tuition Tuition/Engineering Diploma Tuition/Java Programming IT Courses/Java IT Courses/Java/Core Java less

Java Overview

Akshay

Java platform overview Java platform components The Java platform consists of the following components. The Java language Like any programming language, the Java language has its own structure, syntax rules, and programming paradigm. The Java language's programming paradigm is based on the concept... read more

Java platform overview

Java platform components

The Java platform consists of the following components.

The Java language

Like any programming language, the Java language has its own structure, syntax rules, and programming paradigm. The Java language's programming paradigm is based on the concept of object-oriented programming (OOP), which the language's features support.

The Java language is a C-language derivative, so its syntax rules look much like C's. For example, code blocks are modularized into methods and delimited by braces ({ and }), and variables are declared before they are used.

Structurally, the Java language starts with packages. A package is the Java language's namespace mechanism. Within packages are classes, and within classes are methods, variables, constants, and more.

read less
Comments
Dislike Bookmark

Answered on 31/03/2017 Tuition/BTech Tuition Tuition/BTech Tuition/Java Programming

Chetana t.

Tutor

learn basic java programme will take around 1-2 month and fee around 2K-3K. better go with basic+advanced java , it will worth by learning as well as fee wise.
Answers 66 Comments
Dislike Bookmark

Answered on 18/02/2017 Tuition/BTech Tuition Tuition/BTech Tuition/Java Programming

Prashanth K

BEST Technical Trainer & Freelancer

Attend online classes, use video lectures etc.
Answers 45 Comments
Dislike Bookmark

Answered on 20/01/2017 Tuition/BTech Tuition Tuition/BTech Tuition/Java Programming

Srinivas Nangana

Java Expert

1.String is immutable. 2.String is class in java also called referenced data type. 3.It holds collection of characters with out having size limitation. 4.String class contains no of methods to do operations on strings like trim(), charAt(), to Upper Case() etc. 5.String only contains string pool area. 6.String... read more
1.String is immutable. 2.String is class in java also called referenced data type. 3.It holds collection of characters with out having size limitation. 4.String class contains no of methods to do operations on strings like trim(), charAt(), to Upper Case() etc. 5.String only contains string pool area. 6.String objects which are there in string constant pool area not eligible for garbage collector. read less
Answers 36 Comments
Dislike Bookmark

Looking for BTech Tuition

Find best BTech Tuition in your locality on UrbanPro.

FIND NOW

Lesson Posted on 16/12/2016 Advanced Java coaching Tuition/BTech Tuition Tuition/BTech Tuition/Java Programming +5 Java Certification Classes Tuition/Engineering Diploma Tuition Tuition/Engineering Diploma Tuition/Advanced Java Programming IT Courses/Java IT Courses/Java/Core Java less

Importance of Constructor's Visibility.

Milan M Bhagwat

* With 12 years of corporate exp (10 years in teaching exp) providing industry standard classes/contents/workshop...

While developing program or implementing Singleton pattern we have learnt to mention constructor as private and known reason is -> to blocked its direct call from outside of class. But did we think about other aspects of this change.When we want to restrict any class to be sub classed then the direct... read more

While developing program or implementing Singleton pattern we have learnt to mention constructor as private and known reason is -> to blocked its direct call from outside of class. But did we think about other aspects of this change.

When we want to restrict any class to be sub classed then the direct approach we know to make it final. but here are also other ways where eventually its ended up with blocked for getting sub claassed (in some extent). If we will make the constructor private then this will also avoid the direct subclassing. Untill and unless there is over-loaded constructor which is non private and we make the call externally. by default the compiler genrates the code and super call for no arg constructor only. even most of the pojo based tools also work and depend upon no arg default constructor. but once this default constructor being mentioned private for any class then that class directly can not be subclassed. 

 

 

read less
Comments
Dislike Bookmark

About UrbanPro

UrbanPro.com helps you to connect with the best BTech Tuition in India. Post Your Requirement today and get connected.

Overview

Lessons 18

Total Shares  

+ Follow 88,180 Followers

Related Topics

Top Contributors

Connect with Expert Tutors & Institutes for Java Programming

x

Ask a Question

Please enter your Question

Please select a Tag

X

Looking for BTech Tuition Classes?

Find best tutors for BTech Tuition Classes by posting a requirement.

  • Post a learning requirement
  • Get customized responses
  • Compare and select the best

Looking for BTech Tuition Classes?

Find best BTech Tuition Classes in your locality on UrbanPro

Post your learning requirement

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 25 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 6.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more