Answer:
It goes like:
public class Program
{
public static void main(String[] args)
{
int j=18;
int sum=0;
for (int i =1; i<7; i++)
{
sum=sum+(i*(j-2));
j=j-2;
}
System.out.println(sum);
}
}
Explanation:
<u>Variables used: </u>
j : controls the first number in product and decreases by 2 each time the loop runs.
sum: saves the values of addition as the loop runs.
Answer:
NOPE
Explanation:
sometimes presentations can be for one person only. For instance if you work in a company sometimes you present for your boss only etc.
Hope this helped :)
Answer:
The correct option is;
Selecting the correct browser to use for the sites you want to visit
Explanation:
Censorship of information is the subduing of information based on the consideration of such information being harmful or inconvenient
Increased anonymity
Making an individual anonymous which is one of the capabilities of the internet, is seen as encouraging unethical behavior and promoting discussions which are deemed uncivil in a commonly shared space online.
Unauthorized sharing of copyrighted information
The sharing and distribution of copyrighted material is against the law but it is a common occurrence and in various formats online
Out of the given options, selecting the correct browser to use for the sites you want to visit is the one that is not a concern.
By default, if you do not implement a constructor, the compiler will use an empty constructor (no parameters and no code). The following code will create an instance of the MyObject class using the default constructor. The object will have the default vauesfor all the attributes since no parameters were given.
MyObject obj = new MyObject();
Another type of constructor is one with no parameters (no-arg constructor). It is similar to the default, except you actually create this constructor. The contents of the the constructor may include anything. To call a no-arg constructor, use the same line of code as above. The constructor can look like the one below:
public MyObject() {
System.out.println("This is a no-arg constructor");
}
Lastly there is the parameterized constructor. This type of constructor takes in parameters as inputs to assign to values in the newly created object. You call a parameterized constructor as follows:
MyObject obj = new MyObject("Bob", 20);
The constructor will look like this:
public MyObject(String name, int age) {
this.name = name;
this.age = age;
}
In the constructor, the keyword "this" refers to the object, so this.name is a private global variable that is being set equal to the inputted value for name, in this case "Bob".
Hope this helps!
Answer:
class Simple{
public static void main(String args[]){
System.out.println("Hello Daddy and Mum);
}
}
Explanation:
First, we create a class, then a method and then give the Integrated Data Environment (IDE) the command to give out an output that says Hello, Daddy and Mum”