answersLogoWhite

0

📱

Java Programming

The Java programming language was released in 1995 as a core component of the Java platform of Sun Microsystems. It is a general-purpose, class-based, object-oriented language that is widely used in application software and web applications.

5,203 Questions

What variables to marketers use for target marketing?

Segment marketing requires the marketer to break the total market into smaller segments by using certain variables: demographic, geographic, psychographic, and behavioristic.

Strategies in speaking?

There are a variety of strategies in speaking. These include speaking clearly, speaking at an appropriate tone, and speaking with enthusiasm.

How do you learn Java Programming?

you go to school to learn it or you can read books on your own particuarly at amazon just search java programing or google it

One of the best ways to learn a new programming language is to write programs in it. Try rooting around in the Java Programming category on this site. Look for questions like "Write a program to...?" and see if you can figure out how to answer them.

Sun (now Oracle) has a whole website dedicated to the online versions of print books about learning the various parts and techniques of Java, including a very good introduction to Java programming language.

What is hashing in Java?

Creating a Integer out of an object is called hashing. Hashing is commonly used in HashTable, HashMaps and HashSet.

For instance you have

Alex

John

Peter

Hashing on each value would generate something like

123455 Alex

123344 John

123987 Peter

when put in hashtable or hashset would be quicker to find each piece of information.

There are many algorithms available with java to get the hash of an object.

Write a program that would find the count of occurrence of largest digit in the input number?

#include
#include
void main()
{
long int n,r,m,max=0,count=0;
clrscr();
printf("Enter the Number:");
scanf("%ld",&n);
m=n;
while(n>0)
{
r=n%10;
if(r>max)
max=r;
n=n/10;
}
printf("\nLargest Digit is = %ld",max);
while(m>0)
{
r=m%10;
if(r==max)
count++;
m=m/10;
}
printf("\n\nOccurence of Largest Digit %ld is = %ld",max,count);
getch();
}

output:

Enter the Number:68596999

Largest Digit is = 9

Occurence of Largest Digit 9 is = 4

Why did stanislavski create the method?

He didn't create the method he created the 'system'. The method was an American variation which took the thought of physiology in acting to a whole other step. They did this because American's have to have their way in absolutely everything.

He created the 'system' because he started noticing his actors physical and emotional traits didn't look natural when pieced together, so he tried out a technique of learning the play script emotionally and physically simultaneous so that the actors could do their part more natural. From this he started developing the system.

What are the main features of arrays. How are arrays used and created?

AnswerWhat is an array:

In programming languages, an array is a way of storing several items (such as integers). These items must have the same type (only integers, only strings, ...) because an array can't store different items. Every item in an array has a number so the programmer can get the item by using that number. This number is called the index. In some programming languages, the first item has index 0, the second item has index 1 and so on. But in some languages, the first item has index 1 (and then 2, 3, ...).

What is the meaning of printstacktrace in java?


he message and the stacktrace are two distinct pieces of information. While the stackstrace is mandatory, the message isnt. Most exceptions deliver a message, and it is the best practice, but some just don't and there's nothing to be done to fix it.

public

void

process

()

{

try

{

System

.

out

.

println

(

"test"

);

}

catch

(

Exception

e

)

{

e

.

printStackTrace

();

}

}

What is procedure?

It is the order that an event may happen if it is planned;

the way something is meant to be made or to happen.

When is it good idea to calculate an object's attribute on the fly rather than storing it as a data member?

The only time you should calculate it instead of storing is when you only use that attribute once. Otherwise, store it to avoid repeating calculations.

Is it true that in designing an object-oriented program the emphasis is placed on the procedures rather than on the objects needed to solve a given problem?

That is false; the very definition of object-oriented programming is to create objects that model real objects, which places an emphasis on data encapsulation, polymorphic objects, and so on to reduce code complexity, common programming errors, and other problems associated with a non-object-oriented language. The procedures are not nearly as important as the objects that are designed.

What is abstract quantity?

abstract quantity is an quantity of toughts

What ananomus classes in java?

An Anonymous class in Java is one that does not have a name. It is usually created inside a class

How do you convert a java.util.Date to java.lang.String in java?

When you create a SimpleDateFormat object, you specify a pattern String. The contents of the pattern String determine the format of the date and time. For a full description of the pattern's syntax, see the tables in Date Format Pattern Syntax.

The following code formats a date and time according to the pattern String passed to the SimpleDateFormat constructor. The String returned by the format method contains the formatted date and time that are to be displayed. Date today;

String output;

SimpleDateFormat formatter;

formatter = new SimpleDateFormat(pattern, currentLocale);

today = new Date();

output = formatter.format(today);

System.out.println(pattern + " " + output);

The following table shows the output generated by the previous code example when the U.S. Locale is specified:

Customized Date and Time FormatsPatternOutputdd.MM.yy30.06.09yyyy.MM.dd G 'at' hh:mm:ss z2009.06.30 AD at 08:29:36 PDTEEE, MMM d, ''yyTue, Jun 30, '09h:mm a8:29 PMH:mm8:29H:mm:ss:SSS8:28:36:249K:mm a,z8:29 AM,PDTyyyy.MMMMM.dd GGG hh:mm aaa2009.June.30 AD 08:29 AM

source:http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html

Is float type array possible in C?

Yes. For example:

float f_array[3];
double d_array[2];

Which members of the circle class are encapsulated?

The attributes that are common to all circles are a centre point and a radius. However, a circle is a shape thus it should also encapsulate attributes or interfaces that are common to all shapes, such as width(), height(), draw(), move(), fill(), outline() and so on. Thus it makes sense for your circle class to inherit from a common generic base class such as shape, where shape provides a common, pure-virtual interface and encapsulates attributes that are common to all shapes, such as line-width, line-colour and fill-colour.

Ultimately there is no single object model for a circle -- the implementation and encapsulation are entirely dependant upon your needs and the level of functionality you require. If your requirements are different for every application then you might want to separate all the interfaces over several classes and only include what you actually need using multiple inheritance. Thus you can have simple circles which use the minimum memory, as well as more specialised circles which contain more specific functionality.