What is the file extension for Java Source Code?A .javaB .classC .exeD .obj
1. What is the file extension for Java Source Code?A .javaB .classC .exeD .obj
Answer:
A po
Explanation:
Basta yan yung sagot
2. After you write a Java program, the compiler converts the source code into a binary program of byte code.p help please
that is correct. Java source code is compiled into an intermediate representation called bytecode. Bytecode is a platform-independent code format that can run on any device that has a Java Virtual Machine (JVM) installed. The JVM interprets the bytecode and executes the instructions on the specific hardware platform it is running on. This means that Java code can run on any platform that has a JVM, making it a portable and cross-platform language.
3. Writing the source code is the second stage, you can use a program development tool such as java to write a program.
Writing the source code is the second stage, you can use a program development tool such as java to write a program is java script.
4. sample codes in java
Answer:
import java.util.Scanner;
public class Exercise7 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
float timeSeconds;
float mps,kph, mph;
System.out.print("Input distance in meters: ");
float distance = scanner.nextFloat();
System.out.print("Input hour: ");
float hr = scanner.nextFloat();
System.out.print("Input minutes: ");
float min = scanner.nextFloat();
System.out.print("Input seconds: ");
float sec = scanner.nextFloat();
timeSeconds = (hr*3600) + (min*60) + sec;
mps = distance / timeSeconds;
kph = ( distance/1000.0f ) / ( timeSeconds/3600.0f );
mph = kph / 1.609f;
System.out.println("Your speed in meters/second is "+mps);
System.out.println("Your speed in km/h is "+kph);
System.out.println("Your speed in miles/h is "+mph);
scanner.close();
}
}
Answer:
The definition of a code is a set of rules or a system of communication, often with randomly assigned numbers and letters given specific meanings. An example of code is the state's vehicle laws. An example of code is a made up language that two children use to speak to each other.
5. Describe implicit and explicit in java casting. Give a sample code for each.
Type Casting in Java is nothing but converting a primitive or interface or class in Java into other type. There is a rule in Java Language that classes or interface which shares the same type hierrachy only can be typecasted. If there is no relationship between then Java will throw ClassCastException
Implicit
public class Implicit_Casting_Example
{
public static void main(String args[])
{
byte i = 50;
// No casting needed for below conversion
short j = i;
int k = j;
long l = k;
float m = l;
double n = m;
System.out.println("byte value : "+i);
System.out.println("short value : "+j);
System.out.println("int value : "+k);
System.out.println("long value : "+l);
System.out.println("float value : "+m);
System.out.println("double value : "+n);
}
}
Explicit
public class Explicit_Casting_Example
{
public static void main(String args[])
{
double d = 75.0;
// Explicit casting is needed for below conversion
float f = (float) d;
long l = (long) f;
int i = (int) l;
short s = (short) i;
byte b = (byte) s;
System.out.println("double value : "+d);
System.out.println("float value : "+f);
System.out.println("long value : "+l);
System.out.println("int value : "+i);
System.out.println("short value : "+s);
System.out.println("byte value : "+b);
}
}
6. how to make payroll system in java using codes?
.import java.util.Scanner;
public class pay1
{
public static void main(String [] args)
{
Scanner reader = new Scanner(System.in);
double wage, days, hours;
double pay;
System.out.print("Wage?: ");
wage= reader.nextDouble();
System.out.print("Days Worked: ");
days= reader.nextDouble();
System.out.print("Hours worked: ");
hours= reader.nextDouble();
pay=wage*hours*days;
System.out.print("Total pay before goverment steals away some: ");
System.out.println(pay);
}
}
NOTES:
*Just make sure you line up the brackets up and modify it to suite your needs.
*This is just the basic outline of one.
*Methodology that NEVER, EVER changes when building a program or a complete system:
- Determine the inputs you need.
- Determine the outputs you need.
- Determine how to do the calculations.
- Put it all together
7. Code for prime numbers or not in java baka lang. Meron kau dyan
Answer:
Thank you nalang po sa points godbless
8. REFLECTION: What are the advantages of understanding the Java coding guidelines and comments' usage?
Answer:
Pros of Using Java:
Java is Simple: ...
Java is an Object-Oriented Programming Language: ...
Java is a Secure Language: ...
Java is cheap and economical to maintain: ...
Java is platform-independent: ...
Java is a High-Level Programming Language: ...
Java supports portability feature: ...
Java Provides Automatic Garbage Collection:
9. What are the advantages of understanding the Java coding guidelines and comments’ usage?
Answer:
pa brainliest please
Explanation:
1.1 Simple. Java is straightforward to use, write, compile, debug, and learn than alternative programming languages.
1.2 Object-Oriented. It permits you to form standard programs and reusable code.
10. code of who wants to be millionaire in Java script?
Answer:
Code java Script
Explanation:
pano lods
Answer:
Code Java script
Explanation:
paano to lods
11. Which of the following sections of a java class would be found at the top of the code?
Constructors would be found at the top of the code for a java class. This is because constructors are used to initializing an object's state when it is first created. Instance variables, static variables, and methods can be found in a class, but constructors are always at the top. If a class does not have a constructor, java will automatically create a default constructor for the class.
A constructor is like a method, but it is not called explicitly by the code. A constructor is called when an object is created. It has the same name as the class and does not have a return type. A constructor can take parameters, just like a method, which allows you to initialize an object differently depending on how it is created.
If a class needs to perform some actions when it is first created, those actions should be placed in a constructor. For example, if a class represents a person, the constructor might take the person's name and age parameters. The constructor would then use those parameters to initialize the object's state.
A constructor is not required in a java class, but it is often helpful to have one. If a class does not have a constructor, java will automatically create a default constructor for the class. This default constructor will not take any parameters and will not initialize the object's state.
It is often a good idea to write a constructor, even if java would create a default constructor for you. This allows you to provide different ways to create an object, which can be helpful depending on how the object will be used. It also allows you to initialize the object's state in a known way, making your code more straightforward to understand.
Learn more about Java Class:
https://brainly.ph/question/28330763
https://brainly.ph/question/16885398
https://brainly.ph/question/18063579
https://brainly.ph/question/20935961
#LearnWithBrainly
#SPJ4
12. What are the advantages of understanding the java coding guidelines and comments' usage?
Answer:
Commenting involves placing Human Readable Descriptions inside of computer programs detailing what the Code is doing. Proper use of commenting can make code maintenance much easier, as well as helping make finding bugs faster. Further, commenting is very important when writing functions that other people will use.
13. give a java script code to make a image of a virus
Answer:
ako si natoy kailangan natin ng mga toyo
Explanation:
#CarryOnLearning
du go to the it store u idut
14. JAva code for Enter the numbe
Answer:
Ano daw?Ano daw?Ano daw? Ano daw?
15. what is the output genereted by java code?
Answer:
Welcome to Java new world
Explanation:
hope it's helps
16. Write a simple Java code that includes the usage of the equals() method
Answer:
Java String equals() Method Example 2
public class EqualsExample2 {public static void main(String[] args) {String s1 = "javatpoint";String s2 = "javatpoint";String s3 = "Javatpoint";System.out.println(s1.equals(s2)); // True because content is same.if (s1.equals(s3)) {System.out.println("both strings are equal");Explanation:
hope it helps
17. Code for Java Loops #2 Against all "odds"
Where's the question po?
18. Programmers should be careful in writing code For Java since it is almost impossible to anticipate and handle errors in Java programs. true or flase
Answer:
Answer is true
19. Directions: Write TRUE if the statement is correct and FALSE if not. ____________1. JAVA was developed by Sun Microsystems Inc in the year 1992. ____________2. Java Application is just like a Java program that runs on an underlying operating system with the support of a virtual machine. ____________3. JAVA has 13 most important features. ____________4. On November 13, 2006, Sun released much of its Java virtual machine as paid, open-source software. ____________5. JAVA was developed by James Gosling and Patrick Naughton. _____________6. On June 8, 2007, Sun finished the process, making all of its JVM’s core code available under open-source distribution terms. _____________7. Currently, Java is used in mobile devices, internet programming, games, ebusiness, etc. _____________8. An applet is a Java program that can be embedded into a web page. _____________9. Java comments serves as a description of the declared item and used to avoid execution when testing alternative code. ____________ 10. Class names should be nouns, in mixed case, with first letter of each word capitalized.
1.True
2.False
3.True
4.True
5.False
6.False
7.True
8.True
9.False
10.True
Hope it helps
20. code for a simple calculator in java
Answer:
ok ok ok ok o ko ok ok ok ok o k
21. It is possible to reuse Java code previously written for other projects. true or false
Answer:
True
Explanation:
22. what are the advantages in following steps in creating and saving java codes
Answer:
The advantages of Java are as follows:
Java is easy to learn. Java was designed to be easy to use and is therefore easy to write, compile, debug, and learn than other programming languages.
Java is object-oriented. This allows you to create modular programs and reusable code.
Java is platform-independent.
23. What would be the Java code line to produce “Hello my name is Sue”?
Answer:
public class Main {
public static void main(String[] args) {
System.out.println("Hello my name is Sue");
}
}
24. what's the code in java if you want to restart the whole mainmethod?
Answer:
ty
Explanation:
isa lamang akong inusinting bata hangad lang ay makakain ng magnum ice cream
25. It is the symbol used to contain blockof codes in Java.
bruh bruh bruh bruh bruh bruh
26. Example of Java script program code and its algorithm
Answer:
Examples of these Array methods in code: ... The JavaScript Array object is a global object that is used in the construction
27. Using command prompt, to run a java file which of the following code is correct
Answer:
You will use the Java compiler javac to compile your Java programs and the Java interpreter java to run them. You should skip the first step if Java is already installed on your machine.
Download and install the latest version of the Java Platform, Standard Edition Development Kit (Java SE 6 Update 27). Note the installation directory for later—probably something like C:\Program Files\Java\jdk1.6.0_27\bin.
To make sure that Windows can find the Java compiler and interpreter:
Select Start -> Computer -> System Properties -> Advanced system settings -> Environment Variables -> System variables -> PATH.
[ In Vista, select Start -> My Computer -> Properties -> Advanced -> Environment Variables -> System variables -> PATH. ]
[ In Windows XP, Select Start -> Control Panel -> System -> Advanced -> Environment Variables -> System variables -> PATH. ]
Prepend C:\Program Files\Java\jdk1.6.0_27\bin; to the beginning of the PATH variable.
Click OK three times.
Explanation:
easy peasy
28. CREATE A SIMPLE JAVA PROGRAM THAT WILL INTRODUCE YOURSELF (Screenshot the CODES and OUTPUT)
sana makatulog
correct me if im wrong thanks
Answer:
29. When developing for the android os, java byte code is compiled into what?
Answer:
DALVIK BYTE CODE
Explanation:
#HOPEITHELP
#CARRYONLEARNING
CORRECTMEIFIMWRONG
30. Create a java program that will store and display values in Array. flowchart and code
Answer:
ano pong subject yan
Explanation: