What are the three looping statements in java PL?
There are 4 different looping statements in Java. They are:
In computer programming, inheritance means to derive a new object from an existing object, such that the new object inherits all the properties of the existing object. In object oriented programming, derived classes inherit the public and protected members of their base classes. This allows new classes to be created from existing classes, without the need to duplicate large chunks of code in the existing class. The new class can augment the inherited code to provide more specific behaviour.
How do you make a scientific calculator program in java?
import java.io.*;
import java.util.*;
public class Calculator
{
public static void main(String args[])
{
System.out.println("Make your arithmetic selection from the choices below:\n");
System.out.println(" 1. Addition");
System.out.println(" 2. Subtraction");
System.out.println(" 3. Multiplication");
System.out.println(" 4. Division\n");
System.out.print(" Your choice? ");
Scanner kbReader = new Scanner(System.in);
int choice = kbReader.nextInt();
if((choice<=4) && (choice>0))
{
System.out.print("\nEnter first operand. ");
double op1 = kbReader.nextDouble();
System.out.print("\nEnter second operand.");
double op2 = kbReader.nextDouble();
System.out.println("");
switch (choice)
{
case 1: //addition
System.out.println(op1 + " plus " + op2 + " = " + (op1 + op2) );
break;
case 2: //subtraction
System.out.println(op1 + " minus " + op2 + " = " + (op1 - op2) );
break;
case 3: //multiplication
System.out.println(op1 + " times " + op2 + " = " + (op1 * op2) );
break;
case 4: //division
System.out.println(op1 + " divided by " + op2 + " = " + (op1 / op2) );
}
}
else
{
System.out.println("Please enter a 1, 2, 3, or 4.");
}
}
}
Read more: How_do_you_make_calculator_program_in_java
Why broadcast method is not implement in Ipv6?
In IPv6, the same result can be achieved by sending a packet to the link-local all nodes multicast group at address ff02::1, which is analogous to IPv4 multicast to address 224.0.0.1.
J2EE stands for Java 2 Enterprise Edition. It is used to create enterprise class web applications that can be used by large enterprises and corporations. Most websites of major companies are created using j2ee. Some of the technologies used in J2ee are:
a. Struts
b. Hibernate
c. JSP
d. Servlets
e. Spring
f. etc
In java by default all class variables are public protected or private?
The default (no qualifiers) is different from any of those three.
ans is none because top gate are used in very large casting due to erosion occur in this casting
Difference between value semantic and reference semantic?
Typically if one sets a variable like
int x = 100;
it is value semantics,
But
if one creates an array, like
int[] list = new list[10];
it is referring the location, so it is reference semantics.
Can an float value be assigned to int variable?
Yes, an integer can be assigned as a float value.
But it get stored as a float value, that is an implicit type conversion occurs during compilation.Smaller data types are convertible to larger data types.
eg:
float b=12;// an integer constant is assigned to a float variable
printf("%f",b);// when printing b it will print as 12.000000
What does data type mean in I.C.T.?
Data is stored in databases. To make the database more efficient, different types of data are usually classified as a certain 'data type'.
Is Java a Client or Server side scripting language?
Both. It runs on the browser but can request from a Server.
Similarly to Ajax the side is unclear. Client side is the best fit with requests.
How can you fetch from php rather than java and net?
I am not aware of JAVA to that scale but if you just want to fetch data from mysql then PHP is just 2 statements:
Compared to .NET basic queries related to database are a lot simpler in PHP
JDBC stands for Java Database connectivity which is a standard java API for database. It is for database connectivity with project.
In Java, "bytecode" is the name given to the compiled class files. The "compilation" in this case is not for a specific processor, but rather for a kind of fictional processor - and it is meant to be run by a Java Virtual Machine.
What does reached end of file while parsing mean?
Found this on the web, hopes it helps: tarbo
Posts: 219 Re: reached end of file while parsing error
Posted: May 3, 2007 5:49 AM in response to: jlnickymaster
Reply
The compiler was parsing your code and was expecting another token--in this case, likely an ending brace: '}'--but instead reached the end of the stream.
In layman's terms, you're missing a brace to close your class definition.
What is the difference between the C class the E class and the S class Mercedes Benz cars?
C is the entry level mercedes. Think of it as the BMW 3 series. Starts at about $35,000 without many gadgets.
E is the flagship and have built them for 50 years. Think of it like the BMW 5 series. It's about $50,000 yet comes with a ton of great stuff. It's pretty big. Great trunk.
S is their high end luxury brand. Think of it as the 7 series BWM. They are heavy yet fly if you go with the larger engines. It's royalty with the pointed star. They start at about $75,000.
Are there any difference in the way a class method is defined depending on here it is defined?
Yes, there is a difference in the way a class method is defined depending on where it is declared.
Difference between discrimination and classification in datamining?
There is only a slight difference between discrimination and classification in data mining. Discrimination can be negative and classification is generally just factual.
How many bytes does date DD-MM-YYYY datatype occupy in java?
A java.util.Date object will take about 32 bytes in memory.